{\rtf1\windows \deff0{\fonttbl
{\f0\fswiss MS Sans Serif;}{\f1\fmodern Courier New;}{\f2\ftech Symbol;}}\fs20
\page #{\footnote hcAbout}${\footnote \pard{}About this help file}\pard{\fs24\b About this help file}\par\par\pard{}This file was made with the help of {\ul Makertf 3.12b-1}{\v hcMakertf} from the input file tar.texi.\par\par{{{}}}{}{{START-INFO-DIR-ENTRY\line
* tar: (tar).			Making tape (or disk) archives.\line
END-INFO-DIR-ENTRY\par
\pard{}}}\par
{\pard{}This file documents GNU {\f1{}tar}, a utility used to store, backup, and transport files.\par
\par
\pard{}Copyright (C) 1992, 1994, 1995, 1996, 1997 Free Software Foundation, Inc.\par
\par
\pard{}Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are preserved on all copies.\par
\par
\pard{}Permission is granted to copy and distribute modified versions of this manual under the conditions for verbatim copying, provided that the entire resulting derived work is distributed under the terms of a permission notice identical to this one.\par
\par
\pard{}Permission is granted to copy and distribute translations of this manual into another language, under the above conditions for modified versions, except that this permission notice may be stated in a translation approved by the Foundation.  }\par
\par
{\pard{}This file documents GNU {\f1{}tar}, which is a utility used to store, backup, and transport files.  {\f1{}tar} is a tape (or disk) archiver.  This manual documents the release 1.12.\par
\par
}\page\pard Node: {\b Top}, \keepn Next: {\uldb Introduction}{\v Introduction}, Prev: {\uldb (dir)}{\v Top @dir.hlp}, Up: {\uldb (dir)}{\v Top @dir.hlp}\tab\tab{\uldb About this help file}{\v hcAbout}\line
K{\footnote K Top}
#{\footnote Top}
{\par
\par
\pard\pard\keep\fi-2880\li2880\tx2880{}{\uldb Introduction}{\v Introduction}\tab \par
{\uldb Tutorial}{\v Tutorial}\tab \par
{\uldb tar invocation}{\v tar_invocation}\tab \par
{\uldb operations}{\v operations}\tab \par
{\uldb Backups}{\v Backups}\tab \par
{\uldb Choosing}{\v Choosing}\tab \par
{\uldb Date input formats}{\v Date_input_formats}\tab \par
{\uldb Formats}{\v Formats}\tab \par
{\uldb Media}{\v Media}\tab \par
{\uldb Index}{\v Index}\tab \par
\par
  --- The Detailed Node Listing ---\par
\par
  Introduction\par
\par
 \par
{\uldb Book Contents}{\v Book_Contents}\tab What this Book Contains\par
{\uldb Definitions}{\v Definitions}\tab Some Definitions\par
{\uldb What tar Does}{\v What_tar_Does}\tab What {\f1{}tar} Does\par
{\uldb Naming tar Archives}{\v Naming_tar_Archives}\tab How {\f1{}tar} Archives are Named\par
{\uldb posix compliance}{\v posix_compliance}\tab \par
{\uldb Authors}{\v Authors}\tab GNU {\f1{}tar} Authors\par
{\uldb Reports}{\v Reports}\tab Reporting bugs or suggestions\par
\par
  Tutorial Introduction to {\f1{}tar}\par
\par
 \par
{\uldb assumptions}{\v assumptions}\tab \par
{\uldb stylistic conventions}{\v stylistic_conventions}\tab \par
{\uldb basic tar options}{\v basic_tar_options}\tab Basic {\f1{}tar} Operations and Options\par
{\uldb frequent operations}{\v frequent_operations}\tab \par
{\uldb Two Frequent Options}{\v Two_Frequent_Options}\tab \par
{\uldb create}{\v create}\tab How to Create Archives\par
{\uldb list}{\v list}\tab How to List Archives\par
{\uldb extract}{\v extract}\tab How to Extract Members from an Archive\par
{\uldb going further}{\v going_further}\tab \par
\par
  Two Frequently Used Options\par
\par
 \par
{\uldb file tutorial}{\v file_tutorial}\tab \par
{\uldb verbose tutorial}{\v verbose_tutorial}\tab \par
{\uldb help tutorial}{\v help_tutorial}\tab \par
\par
  How to Create Archives\par
\par
 \par
{\uldb prepare for examples}{\v prepare_for_examples}\tab \par
{\uldb Creating the archive}{\v Creating_the_archive}\tab \par
{\uldb create verbose}{\v create_verbose}\tab \par
{\uldb short create}{\v short_create}\tab \par
{\uldb create dir}{\v create_dir}\tab \par
\par
  How to List Archives\par
\par
 \par
{\uldb list dir}{\v list_dir}\tab \par
\par
  How to Extract Members from an Archive\par
\par
 \par
{\uldb extracting archives}{\v extracting_archives}\tab \par
{\uldb extracting files}{\v extracting_files}\tab \par
{\uldb extract dir}{\v extract_dir}\tab \par
{\uldb failing commands}{\v failing_commands}\tab \par
\par
  Invoking GNU {\f1{}tar}\par
\par
 \par
{\uldb Synopsis}{\v Synopsis}\tab \par
{\uldb using tar options}{\v using_tar_options}\tab \par
{\uldb Styles}{\v Styles}\tab \par
{\uldb All Options}{\v All_Options}\tab \par
{\uldb help}{\v help}\tab \par
{\uldb verbose}{\v verbose}\tab \par
{\uldb interactive}{\v interactive}\tab \par
\par
  The Three Option Styles\par
\par
 \par
{\uldb Mnemonic Options}{\v Mnemonic_Options}\tab Mnemonic Option Style\par
{\uldb Short Options}{\v Short_Options}\tab Short Option Style\par
{\uldb Old Options}{\v Old_Options}\tab Old Option Style\par
{\uldb Mixing}{\v Mixing}\tab Mixing Option Styles\par
\par
  All {\f1{}tar} Options\par
\par
 \par
{\uldb Operation Summary}{\v Operation_Summary}\tab \par
{\uldb Option Summary}{\v Option_Summary}\tab \par
{\uldb Short Option Summary}{\v Short_Option_Summary}\tab \par
\par
  GNU {\f1{}tar} Operations\par
\par
 \par
{\uldb Basic tar}{\v Basic_tar}\tab \par
{\uldb Advanced tar}{\v Advanced_tar}\tab \par
{\uldb extract options}{\v extract_options}\tab \par
{\uldb backup}{\v backup}\tab \par
{\uldb Applications}{\v Applications}\tab \par
{\uldb looking ahead}{\v looking_ahead}\tab \par
\par
  Advanced GNU {\f1{}tar} Operations\par
\par
 \par
{\uldb Operations}{\v Operations}\tab \par
{\uldb current state}{\v current_state}\tab \par
{\uldb append}{\v append}\tab \par
{\uldb update}{\v update}\tab \par
{\uldb concatenate}{\v concatenate}\tab \par
{\uldb delete}{\v delete}\tab \par
{\uldb compare}{\v compare}\tab \par
\par
  How to Add Files to Existing Archives: {\f1{}--append}\par
\par
 \par
{\uldb appending files}{\v appending_files}\tab Appending Files to an Archive\par
{\uldb multiple}{\v multiple}\tab \par
\par
  Updating an Archive\par
\par
 \par
{\uldb how to update}{\v how_to_update}\tab \par
\par
  Options Used by {\f1{}--extract}\par
\par
 \par
{\uldb Reading}{\v Reading}\tab Options to Help Read Archives\par
{\uldb Writing}{\v Writing}\tab Changing How {\f1{}tar} Writes Files\par
{\uldb Scarce}{\v Scarce}\tab Coping with Scarce Resources\par
\par
  Options to Help Read Archives\par
\par
 \par
{\uldb read full records}{\v read_full_records}\tab \par
{\uldb Ignore Zeros}{\v Ignore_Zeros}\tab \par
{\uldb Ignore Failed Read}{\v Ignore_Failed_Read}\tab \par
\par
  Changing How {\f1{}tar} Writes Files\par
\par
 \par
{\uldb Prevention Overwriting}{\v Prevention_Overwriting}\tab \par
{\uldb Keep Old Files}{\v Keep_Old_Files}\tab \par
{\uldb Unlink First}{\v Unlink_First}\tab \par
{\uldb Recursive Unlink}{\v Recursive_Unlink}\tab \par
{\uldb Modification Times}{\v Modification_Times}\tab \par
{\uldb Setting Access Permissions}{\v Setting_Access_Permissions}\tab \par
{\uldb Writing to Standard Output}{\v Writing_to_Standard_Output}\tab \par
{\uldb remove files}{\v remove_files}\tab \par
\par
  Options to Prevent Overwriting Files\par
\par
 \par
{\uldb Keep Old Files}{\v Keep_Old_Files}\tab \par
{\uldb Unlink First}{\v Unlink_First}\tab \par
{\uldb Recursive Unlink}{\v Recursive_Unlink}\tab \par
\par
  Coping with Scarce Resources\par
\par
 \par
{\uldb Starting File}{\v Starting_File}\tab \par
{\uldb Same Order}{\v Same_Order}\tab \par
\par
  Performing Backups and Restoring Files\par
\par
 \par
{\uldb Full Dumps}{\v Full_Dumps}\tab Using {\f1{}tar} to Perform Full Dumps\par
{\uldb Inc Dumps}{\v Inc_Dumps}\tab Using {\f1{}tar} to Perform Incremental Dumps\par
{\uldb incremental and listed-incremental}{\v incremental_and_listed_incremental}\tab The Incremental Options\par
{\uldb Backup Levels}{\v Backup_Levels}\tab Levels of Backups\par
{\uldb Backup Parameters}{\v Backup_Parameters}\tab Setting Parameters for Backups and Restoration\par
{\uldb Scripted Backups}{\v Scripted_Backups}\tab Using the Backup Scripts\par
{\uldb Scripted Restoration}{\v Scripted_Restoration}\tab Using the Restore Script\par
\par
  Setting Parameters for Backups and Restoration\par
\par
 \par
{\uldb backup-specs example}{\v backup_specs_example}\tab An Example Text of {\f1{}Backup-specs}\par
{\uldb Script Syntax}{\v Script_Syntax}\tab Syntax for {\f1{}Backup-specs}\par
\par
  Choosing Files and Names for {\f1{}tar}\par
\par
 \par
{\uldb file}{\v file}\tab Choosing the Archive's Name\par
{\uldb Selecting Archive Members}{\v Selecting_Archive_Members}\tab \par
{\uldb files}{\v files}\tab Reading Names from a File\par
{\uldb exclude}{\v exclude}\tab Excluding Some Files\par
{\uldb Wildcards}{\v Wildcards}\tab \par
{\uldb after}{\v after}\tab Operating Only on New Files\par
{\uldb recurse}{\v recurse}\tab Descending into Directories\par
{\uldb one}{\v one}\tab Crossing Filesystem Boundaries\par
\par
  Reading Names from a File\par
\par
 \par
{\uldb nul}{\v nul}\tab \par
\par
  Excluding Some Files\par
\par
 \par
{\uldb problems with exclude}{\v problems_with_exclude}\tab \par
\par
  Crossing Filesystem Boundaries\par
\par
 \par
{\uldb directory}{\v directory}\tab Changing Directory\par
{\uldb absolute}{\v absolute}\tab Absolute File Names\par
\par
  Date input formats\par
\par
 \par
{\uldb General date syntax}{\v General_date_syntax}\tab Common rules.\par
{\uldb Calendar date item}{\v Calendar_date_item}\tab 19 Dec 1994.\par
{\uldb Time of day item}{\v Time_of_day_item}\tab 9:20pm.\par
{\uldb Timezone item}{\v Timezone_item}\tab EST, DST, BST, UCT, AHST, ...\par
{\uldb Day of week item}{\v Day_of_week_item}\tab Monday and others.\par
{\uldb Relative item in date strings}{\v Relative_item_in_date_strings}\tab next tuesday, 2 years ago.\par
{\uldb Pure numbers in date strings}{\v Pure_numbers_in_date_strings}\tab 19931219, 1440.\par
{\uldb Authors of getdate}{\v Authors_of_getdate}\tab Bellovin, Salz, Berets, et al.\par
\par
  Controlling the Archive Format\par
\par
 \par
{\uldb Portability}{\v Portability}\tab Making {\f1{}tar} Archives More Portable\par
{\uldb Compression}{\v Compression}\tab Using Less Space through Compression\par
{\uldb Attributes}{\v Attributes}\tab Handling File Attributes\par
{\uldb Standard}{\v Standard}\tab The Standard Format\par
{\uldb Extensions}{\v Extensions}\tab GNU Extensions to the Archive Format\par
{\uldb cpio}{\v cpio}\tab Comparison of {\f1{}tar} and {\f1{}cpio}\par
\par
  Making {\f1{}tar} Archives More Portable\par
\par
 \par
{\uldb Portable Names}{\v Portable_Names}\tab Portable Names\par
{\uldb dereference}{\v dereference}\tab Symbolic Links\par
{\uldb old}{\v old}\tab Old V7 Archives\par
{\uldb posix}{\v posix}\tab POSIX archives\par
{\uldb Checksumming}{\v Checksumming}\tab Checksumming Problems\par
\par
  Using Less Space through Compression\par
\par
 \par
{\uldb gzip}{\v gzip}\tab Creating and Reading Compressed Archives\par
{\uldb sparse}{\v sparse}\tab Archiving Sparse Files\par
\par
  Tapes and Other Archive Media\par
\par
 \par
{\uldb Device}{\v Device}\tab Device selection and switching\par
{\uldb Remote Tape Server}{\v Remote_Tape_Server}\tab \par
{\uldb Common Problems and Solutions}{\v Common_Problems_and_Solutions}\tab \par
{\uldb Blocking}{\v Blocking}\tab Blocking\par
{\uldb Many}{\v Many}\tab Many archives on one tape\par
{\uldb Using Multiple Tapes}{\v Using_Multiple_Tapes}\tab Using Multiple Tapes\par
{\uldb label}{\v label}\tab Including a Label in the Archive\par
{\uldb verify}{\v verify}\tab \par
{\uldb Write Protection}{\v Write_Protection}\tab \par
\par
  Blocking\par
\par
 \par
{\uldb Format Variations}{\v Format_Variations}\tab Format Variations\par
{\uldb Blocking Factor}{\v Blocking_Factor}\tab The Blocking Factor of an Archive\par
\par
  Many Archives on One Tape\par
\par
 \par
{\uldb Tape Positioning}{\v Tape_Positioning}\tab Tape Positions and Tape Marks\par
{\uldb mt}{\v mt}\tab The {\f1{}mt} Utility\par
\par
  Using Multiple Tapes\par
\par
 \par
{\uldb Multi-Volume Archives}{\v Multi_Volume_Archives}\tab Archives Longer than One Tape or Disk\par
{\uldb Tape Files}{\v Tape_Files}\tab Tape Files\par
\pard{}}\par
\page\pard Node: {\b Introduction}, \keepn Next: {\uldb Tutorial}{\v Tutorial}, Prev: {\uldb Top}{\v Top}, Up: {\uldb Top}{\v Top}\line
K{\footnote K Introduction}
#{\footnote Introduction}
${\footnote \pard{}Introduction}\par
\pard{\fs24\b Introduction}\par
\par
\pard{}Welcome to the GNU {\f1{}tar} manual.  GNU {\f1{}tar} is used to create and manipulate files (\'A2archives\'A2) which are actually collections of many other files; the program provides users with an organized and systematic method for controlling a large amount of data.\par
\par
{\par
\pard\keep\fi-2880\li2880\tx2880{}{\uldb Book Contents}{\v Book_Contents}\tab What this Book Contains\par
{\uldb Definitions}{\v Definitions}\tab Some Definitions\par
{\uldb What tar Does}{\v What_tar_Does}\tab What {\f1{}tar} Does\par
{\uldb Naming tar Archives}{\v Naming_tar_Archives}\tab How {\f1{}tar} Archives are Named\par
{\uldb posix compliance}{\v posix_compliance}\tab \par
{\uldb Authors}{\v Authors}\tab GNU {\f1{}tar} Authors\par
{\uldb Reports}{\v Reports}\tab Reporting bugs or suggestions\par
\pard{}}\par
\page\pard Node: {\b Book Contents}, \keepn Next: {\uldb Definitions}{\v Definitions}, Prev: {\uldb Introduction}{\v Introduction}, Up: {\uldb Introduction}{\v Introduction}\line
K{\footnote K Book Contents}
#{\footnote Book_Contents}
{${\footnote \pard{}What this Book Contains}\par
\pard{\fs24\b What this Book Contains}\par
\par
}\pard{}The first part of this chapter introduces you to various terms that will recur throughout the book.  It also tells you who has worked on GNU {\f1{}tar} and its documentation, and where you should send bug reports or comments.\par
\par
\pard{}The second chapter is a tutorial (see {\uldb Tutorial}{\v Tutorial}) which provides a gentle introduction for people who are new to using {\f1{}tar}.  It is meant to be self contained, not requiring any reading from subsequent chapters to make sense.  It moves from topic to topic in a logical, progressive order, building on information already explained.\par
\par
\pard{}Although the tutorial is paced and structured to allow beginners to learn how to use {\f1{}tar}, it is not intended solely for beginners.  The tutorial explains how to use the three most frequently used operations ({\f1{}create}, {\f1{}list}, and {\f1{}extract}) as well as two frequently used options ({\f1{}file} and {\f1{}verbose}).  The other chapters do not refer to the tutorial frequently; however, if a section discusses something which is a complex variant of a basic concept, there may be a cross reference to that basic concept.  (The entire book, including the tutorial, assumes that the reader understands some basic concepts of using a Unix-type operating system; see {\uldb Tutorial}{\v Tutorial}.)\par
\par
\pard{}The third chapter presents the remaining five operations, and information about using {\f1{}tar} options and option syntax.\par
\par
\pard{}The other chapters are meant to be used as a reference.  Each chapter presents everything that needs to be said about a specific topic.\par
\par
\pard{}One of the chapters (see {\uldb Date input formats}{\v Date_input_formats}) exists in its entirety in other GNU manuals, and is mostly self-contained.  In addition, one section of this manual (see {\uldb Standard}{\v Standard}) contains a big quote which is taken directly from {\f1{}tar} sources.\par
\par
\pard{}In general, we give both the long and short (abbreviated) option names at least once in each section where the relevant option is covered, so that novice readers will become familiar with both styles.  (A few options have no short versions, and the relevant sections will indicate this.)\par
\par
\page\pard Node: {\b Definitions}, \keepn Next: {\uldb What tar Does}{\v What_tar_Does}, Prev: {\uldb Book Contents}{\v Book_Contents}, Up: {\uldb Introduction}{\v Introduction}\line
K{\footnote K Definitions}
#{\footnote Definitions}
${\footnote \pard{}Some Definitions}\par
\pard{\fs24\b Some Definitions}\par
\par
\pard{}{K{\footnote K archive}}{K{\footnote K tar archive}}The {\f1{}tar} program is used to create and manipulate {\f1{}tar} archives.  An \'A2archive\'A2 is a single file which contains the contents of many files, while still identifying the names of the files, their owner(s), and so forth.  (In addition, archives record access permissions, user and group, size in bytes, and last modification time.  Some archives also record the file names in each archived directory, as well as other file and directory information.)  You can use {\f1{}tar} to \'A2create\'A2 a new archive in a specified directory.\par
\par
\pard{}{K{\footnote K member}}{K{\footnote K archive member}}{K{\footnote K file name}}{K{\footnote K member name}}The files inside an archive are called \'A2members\'A2.  Within this manual, we use the term \'A2file\'A2 to refer only to files accessible in the normal ways (by {\f1{}ls}, {\f1{}cat}, and so forth), and the term \'A2member\'A2 to refer only to the members of an archive.  Similarly, a \'A2file name\'A2 is the name of a file, as it resides in the filesystem, and a \'A2member name\'A2 is the name of an archive member within the archive.\par
\par
\pard{}{K{\footnote K extraction}}{K{\footnote K unpacking}}The term \'A2extraction\'A2 refers to the process of copying an archive member (or multiple members) into a file in the filesystem.  Extracting all the members of an archive is often called \'A2extracting the archive\'A2.  The term \'A2unpack\'A2 can also be used to refer to the extraction of many or all the members of an archive.  Extracting an archive does not destroy the archive's structure, just as creating an archive does not destroy the copies of the files that exist outside of the archive.  You may also \'A2list\'A2 the members in a given archive (this is often thought of as "printing" them to the standard output, or the command line), or \'A2append\'A2 members to a pre-existing archive.  All of these operations can be peformed using {\f1{}tar}.\par
\par
\page\pard Node: {\b What tar Does}, \keepn Next: {\uldb Naming tar Archives}{\v Naming_tar_Archives}, Prev: {\uldb Definitions}{\v Definitions}, Up: {\uldb Introduction}{\v Introduction}\line
K{\footnote K What tar Does}
#{\footnote What_tar_Does}
${\footnote \pard{}What {\f1{}tar} Does}\par
\pard{\fs24\b What {\f1{}tar} Does}\par
\par
\pard{}{K{\footnote K tar}}The {\f1{}tar} program provides the ability to create {\f1{}tar} archives, as well as various other kinds of manipulation.  For example, you can use {\f1{}tar} on previously created archives to extract files, to store additional files, or to update or list files which were already stored.\par
\par
\pard{}Initially, {\f1{}tar} archives were used to store files conveniently on magnetic tape.  The name {\f1{}tar} comes from this use; it stands for {\f1{}t}ape {\f1{}ar}chiver.  Despite the utility's name, {\f1{}tar} can direct its output to available devices, files, or other programs (using pipes).  {\f1{}tar} may even access remote devices or files (as archives).\par
\par
\pard{}You can use {\f1{}tar} archives in many ways.  We want to stress a few of them: storage, backup, and transportation.\par
\par
{\pard{}Storage\par
\pard\li720{}Often, {\f1{}tar} archives are used to store related files for convenient file transfer over a network.  For example, the GNU Project distributes its software bundled into {\f1{}tar} archives, so that all the files relating to a particular program (or set of related programs) can be transferred as a single unit.\par
\par
\pard\li720{}A magnetic tape can store several files in sequence.  However, the tape has no names for these files; it only knows their relative position on the tape.  One way to store several files on one tape and retain their names is by creating a {\f1{}tar} archive.  Even when the basic transfer mechanism can keep track of names, as FTP can, the nuisance of handling multiple files, directories, and multiple links makes {\f1{}tar} archives useful.\par
\par
\pard\li720{}Archive files are also used for long-term storage.  You can think of this as transportation from the present into the future.  (It is a science-fiction idiom that you can move through time as well as in space; the idea here is that {\f1{}tar} can be used to move archives in all dimensions, even time!)\par
\par
\pard{}Backup\par
\pard\li720{}Because the archive created by {\f1{}tar} is capable of preserving file information and directory structure, {\f1{}tar} is commonly used for performing full and incremental backups of disks.  A backup puts a collection of files (possibly pertaining to many users and projects) together on a disk or a tape.  This guards against accidental destruction of the information in those files.  GNU {\f1{}tar} has special features that allow it to be used to make incremental and full dumps of all the files in a filesystem.\par
\par
\pard{}Transportation\par
\pard\li720{}You can create an archive on one system, transfer it to another system, and extract the contents there.  This allows you to transport a group of files from one system to another.\par
\pard{}}\par
\page\pard Node: {\b Naming tar Archives}, \keepn Next: {\uldb posix compliance}{\v posix_compliance}, Prev: {\uldb What tar Does}{\v What_tar_Does}, Up: {\uldb Introduction}{\v Introduction}\line
K{\footnote K Naming tar Archives}
#{\footnote Naming_tar_Archives}
${\footnote \pard{}How {\f1{}tar} Archives are Named}\par
\pard{\fs24\b How {\f1{}tar} Archives are Named}\par
\par
\pard{}Conventionally, {\f1{}tar} archives are given names ending with {\f1{}.tar}.  This is not necessary for {\f1{}tar} to operate properly, but this manual follows that convention in order to accustom readers to it and to make examples more clear.\par
\par
\pard{}{K{\footnote K tar file}}{K{\footnote K entry}}{K{\footnote K tar entry}}Often, people refer to {\f1{}tar} archives as "{\f1{}tar} files," and archive members as "files" or "entries".  For people familiar with the operation of {\f1{}tar}, this causes no difficulty.  However, in this manual, we consistently refer to "archives" and "archive members" to make learning to use {\f1{}tar} easier for novice users.\par
\par
\page\pard Node: {\b posix compliance}, \keepn Next: {\uldb Authors}{\v Authors}, Prev: {\uldb Naming tar Archives}{\v Naming_tar_Archives}, Up: {\uldb Introduction}{\v Introduction}\line
K{\footnote K posix compliance}
#{\footnote posix_compliance}
${\footnote \pard{}POSIX Compliance}\par
\pard{\fs24\b POSIX Compliance}\par
\par
\pard{}We make some of our recommendations throughout this book for one reason in addition to what we think of as "good sense".  The main additional reason for a recommendation is to be compliant with the POSIX standards.  If you set the shell environment variable {\f1{}POSIXLY_CORRECT}, GNU {\f1{}tar} will force you to adhere to these standards.  Therefore, if this variable is set and you violate one of the POSIX standards in the way you phrase a command, for example, GNU {\f1{}tar} will not allow the command and will signal an error message.  You would then have to reorder the options or rephrase the command to comply with the POSIX standards.\par
\par
\pard{}There is a chance in the future that, if you set this environment variable, your archives will be forced to comply with POSIX standards, also.  No GNU {\f1{}tar} extensions will be allowed.\par
\par
\page\pard Node: {\b Authors}, \keepn Next: {\uldb Reports}{\v Reports}, Prev: {\uldb posix compliance}{\v posix_compliance}, Up: {\uldb Introduction}{\v Introduction}\line
K{\footnote K Authors}
#{\footnote Authors}
${\footnote \pard{}GNU {\f1{}tar} Authors}\par
\pard{\fs24\b GNU {\f1{}tar} Authors}\par
\par
\pard{}GNU {\f1{}tar} was originally written by John Gilmore, and modified by many people.  The GNU enhancements were written by Jay Fenlason, then Joy Kendall, and the whole package has been further maintained by Thomas Bushnell, n/BSG, and finally Franc,ois Pinard, with the help of numerous and kind users.\par
\par
\pard{}We wish to stress that {\f1{}tar} is a collective work, and owes much to all those people who reported problems, offered solutions and other insights, or shared their thoughts and suggestions.  An impressive, yet partial list of those contributors can be found in the {\f1{}THANKS} file from the GNU {\f1{}tar} distribution.\par
\par
\pard{}Jay Fenlason put together a draft of a GNU {\f1{}tar} manual, borrowing notes from the original man page from John Gilmore.  This draft has been distributed in {\f1{}tar} versions 1.04 (or even before?)   through 1.10, then withdrawn in version 1.11.  Thomas Bushnell, n/BSG and Amy Gorin worked on a tutorial and manual for GNU {\f1{}tar}.  Franc,ois Pinard put version 1.11.8 of the manual together by taking information from all these sources and merging them.  Melissa Weisshaus finally edited and redesigned the book to create version 1.12.\par
\par
\pard{}For version 1.12, Daniel Hagerty contributed a great deal of technical consulting.  In particular, he is the primary author of {\uldb Backups}{\v Backups}.\par
\par
\page\pard Node: {\b Reports}, \keepn Next: {\uldb }{\v }, Prev: {\uldb Authors}{\v Authors}, Up: {\uldb Introduction}{\v Introduction}\line
K{\footnote K Reports}
#{\footnote Reports}
${\footnote \pard{}Reporting bugs or suggestions}\par
\pard{\fs24\b Reporting bugs or suggestions}\par
\par
\pard{}{K{\footnote K bug reports}}{K{\footnote K reporting bugs}}If you find problems or have suggestions about this program or manual, please report them to {\f1{}bug-gnu-utils@prep.ai.mit.edu}.\par
\par
\page\pard Node: {\b Tutorial}, \keepn Next: {\uldb tar invocation}{\v tar_invocation}, Prev: {\uldb Introduction}{\v Introduction}, Up: {\uldb Top}{\v Top}\line
K{\footnote K Tutorial}
#{\footnote Tutorial}
${\footnote \pard{}Tutorial Introduction to {\f1{}tar}}\par
\pard{\fs24\b Tutorial Introduction to {\f1{}tar}}\par
\par
\pard{}This chapter guides you through some basic examples of three {\f1{}tar} operations: {\f1{}--create}, {\f1{}--list}, and {\f1{}--extract}.  If you already know how to use some other version of {\f1{}tar}, then you may not need to read this chapter.  This chapter omits most complicated details about how {\f1{}tar} works.\par
\par
{\par
\pard\keep\fi-2880\li2880\tx2880{}{\uldb assumptions}{\v assumptions}\tab \par
{\uldb stylistic conventions}{\v stylistic_conventions}\tab \par
{\uldb basic tar options}{\v basic_tar_options}\tab Basic {\f1{}tar} Operations and Options\par
{\uldb frequent operations}{\v frequent_operations}\tab \par
{\uldb Two Frequent Options}{\v Two_Frequent_Options}\tab \par
{\uldb create}{\v create}\tab How to Create Archives\par
{\uldb list}{\v list}\tab How to List Archives\par
{\uldb extract}{\v extract}\tab How to Extract Members from an Archive\par
{\uldb going further}{\v going_further}\tab\par
\pard{}}\par
\page\pard Node: {\b assumptions}, \keepn Next: {\uldb stylistic conventions}{\v stylistic_conventions}, Prev: {\uldb Tutorial}{\v Tutorial}, Up: {\uldb Tutorial}{\v Tutorial}\line
K{\footnote K assumptions}
#{\footnote assumptions}
{${\footnote \pard{}Assumptions this Tutorial Makes}\par
\pard{\fs24\b Assumptions this Tutorial Makes}\par
\par
}\pard{}This chapter is paced to allow beginners to learn about {\f1{}tar} slowly.  At the same time, we will try to cover all the basic aspects of these three operations.  In order to accomplish both of these tasks, we have made certain assumptions about your knowledge before reading this manual, and the hardware you will be using:\par
\par
{\pard\fi-720\li720\tx144\tx720{}\tab{}{\f2\'B7}\tab{}Before you start to work through this tutorial, you should understand what the terms "archive" and "archive member" mean (see {\uldb Definitions}{\v Definitions}).  In addition, you should understand something about how Unix-type operating systems work, and you should know how to use some basic utilities.  For example, you should know how to create, list, copy, rename, edit, and delete files and directories; how to change between directories; and how to figure out where you are in the filesystem.  You should have some basic understanding of directory structure and how files are named according to which directory they are in.  You should understand concepts such as standard output and standard input, what various definitions of the term "argument" mean, the differences between relative and absolute path names, and .\par
\par
\pard\fi-720\li720\tx144\tx720{}\tab{}{\f2\'B7}\tab{}This manual assumes that you are working from your own home directory (unless we state otherwise).  In this tutorial, you will create a directory to practice {\f1{}tar} commands in.  When we show path names, we will assume that those paths are relative to your home directory.  For example, my home directory path is {\f1{}/home/fsf/melissa}.  All of my examples are in a subdirectory of the directory named by that path name; the subdirectory is called {\f1{}practice}.\par
\par
\pard\fi-720\li720\tx144\tx720{}\tab{}{\f2\'B7}\tab{}In general, we show examples of archives which exist on (or can be written to, or worked with from) a directory on a hard disk.  In most cases, you could write those archives to, or work with them on any other device, such as a tape drive.  However, some of the later examples in the tutorial and next chapter will not work on tape drives.  Additionally, working with tapes is much more complicated than working with hard disks.  For these reasons, the tutorial does not cover working with tape drives.  See {\uldb Media}{\v Media} for complete information on using {\f1{}tar} archives with tape drives.\par
\par
\pard{}}\par
\page\pard Node: {\b stylistic conventions}, \keepn Next: {\uldb basic tar options}{\v basic_tar_options}, Prev: {\uldb assumptions}{\v assumptions}, Up: {\uldb Tutorial}{\v Tutorial}\line
K{\footnote K stylistic conventions}
#{\footnote stylistic_conventions}
{${\footnote \pard{}Stylistic Conventions}\par
\pard{\fs24\b Stylistic Conventions}\par
\par
}\pard{}In the examples, {\f1{}$} represents a typical shell prompt.  It precedes lines you should type; to make this more clear, those lines are shown in {\f1{}this font}, as opposed to lines which represent the computer's response; those lines are shown in {\f1{}this font}, or sometimes {\f1{}like this}.  When we have lines which are too long to be displayed in any other way, we will show them like this:\par
\par
{\pard\keep\li720\f1{}This is an example of a line which would otherwise not fit in this space.\par
\pard\f0{}}\par
\page\pard Node: {\b basic tar options}, \keepn Next: {\uldb frequent operations}{\v frequent_operations}, Prev: {\uldb stylistic conventions}{\v stylistic_conventions}, Up: {\uldb Tutorial}{\v Tutorial}\line
K{\footnote K basic tar options}
#{\footnote basic_tar_options}
${\footnote \pard{}Basic {\f1{}tar} Operations and Options}\par
\pard{\fs24\b Basic {\f1{}tar} Operations and Options}\par
\par
{\f1{}\pard{}tar} can take a wide variety of arguments which specify and define the actions it will have on the particular set of files or the archive.  The main types of arguments to {\f1{}tar} fall into one of two classes: operations, and options.\par
\par
\pard{}Some arguments fall into a class called \'A2operations\'A2; exactly one of these is both allowed and required for any instance of using {\f1{}tar}; you may {\i not} specify more than one.  People sometimes speak of \'A2operating modes\'A2.  You are in a particular operating mode when you have specified the operation which specifies it; there are eight operations in total, and thus there are eight operating modes.\par
\par
\pard{}The other arguments fall into the class known as \'A2options\'A2.  You are not required to specify any options, and you are allowed to specify more than one at a time (depending on the way you are using {\f1{}tar} at that time).  Some options are used so frequently, and are so useful for helping you type commands more carefully that they are effectively "required".  We will discuss them in this chapter.\par
\par
\pard{}You can write most of the {\f1{}tar} operations and options in any of three forms: long (mnemonic) form, short form, and old style.  Some of the operations and options have no short or "old" forms; however, the operations and options which we will cover in this tutorial have corresponding abbreviations.   We will indicate those abbreviations appropriately to get you used to seeing them.  (Note that the "old style" option forms exist in GNU {\f1{}tar} for compatibility with Unix {\f1{}tar}.  We present a full discussion of this way of writing options and operations appears in {\uldb Old Options}{\v Old_Options}, and we discuss the other two styles of writing options in {\uldb Mnemonic Options}{\v Mnemonic_Options} and {\uldb Short Options}{\v Short_Options}.)\par
\par
\pard{}In the examples and in the text of this tutorial, we usually use the long forms of operations and options; but the "short" forms produce the same result and can make typing long {\f1{}tar} commands easier.  For example, instead of typing\par
\par
{\pard\keep\li720\f1{}tar --create --verbose --file=afiles.tar apple angst aspic\par
\pard\f0{}}\par
\pard{}you can type {\par
\pard\keep\li720\f1{}tar -c -v -f afiles.tar apple angst aspic\par
\pard\f0{}}\par
\pard{}or even {\par
\pard\keep\li720\f1{}tar -cvf afiles.tar apple angst aspic\par
\pard\f0{}}\par
\pard{}For more information on option syntax, see {\uldb Advanced tar}{\v Advanced_tar}.  In discussions in the text, when we name an option by its long form, we also give the corresponding short option in parentheses.\par
\par
\pard{}The term, "option", can be confusing at times, since "operations" are often lumped in with the actual, {\i optional} "options" in certain general class statements.  For example, we just talked about "short and long forms of options and operations".  However, experienced {\f1{}tar} users often refer to these by shorthand terms such as, "short and long options".  This term assumes that the "operations" are included, also.  Context will help you determine which definition of "options" to use.\par
\par
\pard{}Similarly, the term "command" can be confusing, as it is often used in two different ways.  People sometimes refer to {\f1{}tar} "commands".  A {\f1{}tar} \'A2command\'A2 is the entire command line of user input which tells {\f1{}tar} what to do -- including the operation, options, and any arguments (file names, pipes, other commands, etc).  However, you will also sometimes hear the term "the {\f1{}tar} command".  When the word "command" is used specifically like this, a person is usually referring to the {\f1{}tar} {\i operation}, not the whole line.  Again, use context to figure out which of the meanings the speaker intends.\par
\par
\page\pard Node: {\b frequent operations}, \keepn Next: {\uldb Two Frequent Options}{\v Two_Frequent_Options}, Prev: {\uldb basic tar options}{\v basic_tar_options}, Up: {\uldb Tutorial}{\v Tutorial}\line
K{\footnote K frequent operations}
#{\footnote frequent_operations}
${\footnote \pard{}The Three Most Frequently Used Operations}\par
\pard{\fs24\b The Three Most Frequently Used Operations}\par
\par
\pard{}Here are the three most frequently used operations (both short and long forms), as well as a brief description of their meanings.  The rest of this chapter will cover how to use these operations in detail.  We will present the rest of the operations in the next chapter.\par
\par
{\pard{}{\f1{}--create}\par
\pard{}{\f1{}-c}\par
\pard\li720{}Create a new {\f1{}tar} archive.\par
\par
\pard{}{\f1{}--list}\par
\pard{}{\f1{}-t}\par
\pard\li720{}List the contents of an archive.\par
\par
\pard{}{\f1{}--extract}\par
\pard{}{\f1{}-x}\par
\pard\li720{}Extract one or more members from an archive.\par
\pard{}}\par
\page\pard Node: {\b Two Frequent Options}, \keepn Next: {\uldb create}{\v create}, Prev: {\uldb frequent operations}{\v frequent_operations}, Up: {\uldb Tutorial}{\v Tutorial}\line
K{\footnote K Two Frequent Options}
#{\footnote Two_Frequent_Options}
${\footnote \pard{}Two Frequently Used Options}\par
\pard{\fs24\b Two Frequently Used Options}\par
\par
\pard{}To understand how to run {\f1{}tar} in the three operating modes listed previously, you also need to understand how to use two of the options to {\f1{}tar}: {\f1{}--file} (which takes an archive file as an argument) and {\f1{}--verbose}.  (You are usually not {\i required} to specify either of these options when you run {\f1{}tar}, but they can be very useful in making things more clear and helping you avoid errors.)\par
\par
{\par
\pard\keep\fi-2880\li2880\tx2880{}{\uldb file tutorial}{\v file_tutorial}\tab \par
{\uldb verbose tutorial}{\v verbose_tutorial}\tab \par
{\uldb help tutorial}{\v help_tutorial}\tab\par
\pard{}}\par
\page\pard Node: {\b file tutorial}, \keepn Next: {\uldb verbose tutorial}{\v verbose_tutorial}, Prev: {\uldb Two Frequent Options}{\v Two_Frequent_Options}, Up: {\uldb Two Frequent Options}{\v Two_Frequent_Options}\line
K{\footnote K file tutorial}
#{\footnote file_tutorial}
${\footnote \pard{}The {\f1{}--file} Option}\par
\pard{\fs24\b The {\f1{}--file} Option}\par
\par
{\pard{}{\f1{}--file={\i archive-name}}\par
\pard{}{\f1{}-f {\i archive-name}}\par
\pard\li720{}Specify the name of an archive file.\par
\pard{}}\par
\pard{}You can specify an argument for the {\f1{}--file={\i archive-name}} ({\f1{}-f {\i archive-name}}) option whenever you use {\f1{}tar}; this option determines the name of the archive file that {\f1{}tar} will work on.\par
\par
\pard{}If you don't specify this argument, then {\f1{}tar} will use a default, usually some physical tape drive attached to your machine.  If there is no tape drive attached, or the default is not meaningful, then {\f1{}tar} will print an error message.  The error message might look roughly like one of the following:\par
\par
{\pard\keep\li720\f1{}tar: can't open /dev/rmt8 : No such device or address\line
tar: can't open /dev/rsmt0 : I/O error\par
\pard\f0{}}\par
\pard{}To avoid confusion, we recommend that you always specfiy an archive file name by using {\f1{}--file={\i archive-name}} ({\f1{}-f {\i archive-name}}) when writing your {\f1{}tar} commands.  For more information on using the {\f1{}--file={\i archive-name}} ({\f1{}-f {\i archive-name}}) option, see {\uldb file}{\v file}.\par
\par
\page\pard Node: {\b verbose tutorial}, \keepn Next: {\uldb help tutorial}{\v help_tutorial}, Prev: {\uldb file tutorial}{\v file_tutorial}, Up: {\uldb Two Frequent Options}{\v Two_Frequent_Options}\line
K{\footnote K verbose tutorial}
#{\footnote verbose_tutorial}
${\footnote \pard{}The {\f1{}--verbose} Option}\par
\pard{\fs24\b The {\f1{}--verbose} Option}\par
\par
{\pard{}{\f1{}--verbose}\par
\pard{}{\f1{}-v}\par
\pard\li720{}Show the files being worked on as {\f1{}tar} is running.\par
\pard{}}\par
\pa\'7BNo Value For "rd\'7B\'7Dop-verbose"\'7D shows details about the results of running {\f1{}tar}.  This can be especially useful when the results might not be obvious.  For example, if you want to see the progress of {\f1{}tar} as it writes files into the archive, you can use the {\f1{}--verbose} option.  In the beginning, you may find it useful to use {\f1{}--verbose} at all times; when you are more accustomed to {\f1{}tar}, you will likely want to use it at certain times but not at others.  We will use {\f1{}--verbose} at times to help make something clear, and we will give many examples both using and not using {\f1{}--verbose} to show the differences.\par
\par
\pard{}Sometimes, a single instance of {\f1{}--verbose} on the command line will show a full, {\f1{}ls} style listing of an archive or files, giving sizes, owners, and similar information.  Other times, {\f1{}--verbose} will only show files or members that the particular operation is operating on at the time.  In the latter case, you can use {\f1{}--verbose} twice in a command to get a listing such as that in the former case.  For example, instead of saying\par
\par
{\pard\keep\li720\f1{}tar -cvf afiles.tar apple angst aspic\par
\pard\f0{}}\par
\pard{}above, you might say\par
\par
{\pard\keep\li720\f1{}tar -cvvf afiles.tar apple angst aspic\par
\pard\f0{}}\par
\pard{}This works equally well using short or long forms of options.  Using long forms, you would simply write out the mnemonic form of the option twice, like this:\par
\par
{\pard\keep\li720\f1{}$ tar --create --verbose --verbose ...\par
\pard\f0{}}\par
\pard{}Note that you must double the hyphens properly each time.\par
\par
\pard{}Later in the tutorial, we will give examples using {\f1{}--verbose --verbose}.\par
\par
\page\pard Node: {\b help tutorial}, \keepn Next: {\uldb }{\v }, Prev: {\uldb verbose tutorial}{\v verbose_tutorial}, Up: {\uldb Two Frequent Options}{\v Two_Frequent_Options}\line
K{\footnote K help tutorial}
#{\footnote help_tutorial}
${\footnote \pard{}Getting Help: Using the {\f1{}--help} Option}\par
\pard{\fs24\b Getting Help: Using the {\f1{}--help} Option}\par
\par
{\pard{}{\f1{}--help}\par
\pard\li720{}The {\f1{}--help} option to {\f1{}tar} prints out a very brief list of all operations and option available for the current version of {\f1{}tar} available on your system.\par
\pard{}}\par
\page\pard Node: {\b create}, \keepn Next: {\uldb list}{\v list}, Prev: {\uldb Two Frequent Options}{\v Two_Frequent_Options}, Up: {\uldb Tutorial}{\v Tutorial}\line
K{\footnote K create}
#{\footnote create}
${\footnote \pard{}How to Create Archives}\par
\pard{\fs24\b How to Create Archives}\par
\par
{{{\i \pard\li720{}(This message will disappear, once this node revised.)}\par
\pard{}}}\par
\pard{}One of the basic operations of {\f1{}tar} is {\f1{}--create} ({\f1{}-c}), which you use to create a {\f1{}tar} archive.  We will explain {\f1{}--create} first because, in order to learn about the other operations, you will find it useful to have an archive available to practice on.\par
\par
\pard{}To make this easier, in this section you will first create a directory containing three files.  Then, we will show you how to create an {\i archive} (inside the new directory).  Both the directory, and the archive are specifically for you to practice on.  The rest of this chapter and the next chapter will show many examples using this directory and the files you will create: some of those files may be other directories and other archives.\par
\par
\pard{}The three files you will archive in this example are called {\f1{}blues}, {\f1{}folk}, and {\f1{}jazz}.  The archive is called {\f1{}collection.tar}.\par
\par
\pard{}This section will proceed slowly, detailing how to use {\f1{}--create} in {\f1{}verbose} mode, and showing examples using both short and long forms.  In the rest of the tutorial, and in the examples in the next chapter, we will proceed at a slightly quicker pace.  This section moves more slowly to allow beginning users to understand how {\f1{}tar} works.\par
\par
{\par
\pard\keep\fi-2880\li2880\tx2880{}{\uldb prepare for examples}{\v prepare_for_examples}\tab \par
{\uldb Creating the archive}{\v Creating_the_archive}\tab \par
{\uldb create verbose}{\v create_verbose}\tab \par
{\uldb short create}{\v short_create}\tab \par
{\uldb create dir}{\v create_dir}\tab\par
\pard{}}\par
\page\pard Node: {\b prepare for examples}, \keepn Next: {\uldb Creating the archive}{\v Creating_the_archive}, Prev: {\uldb create}{\v create}, Up: {\uldb create}{\v create}\line
K{\footnote K prepare for examples}
#{\footnote prepare_for_examples}
${\footnote \pard{}Preparing a Practice Directory for Examples}\par
\pard{\fs24\b Preparing a Practice Directory for Examples}\par
\par
\pard{}To follow along with this and future examples, create a new directory called {\f1{}practice} containing files called {\f1{}blues}, {\f1{}folk} and {\f1{}jazz}.  The files can contain any information you like: ideally, they should contain information which relates to their names, and be of different lengths.  Our examples assume that {\f1{}practice} is a subdirectory of your home directory.\par
\par
\pard{}Now {\f1{}cd} to the directory named {\f1{}practice}; {\f1{}practice} is now your \'A2working directory\'A2.  ({\i Please note}: Although the full path name of this directory is {\f1{}/{\i homedir}/practice}, in our examples we will refer to this directory as {\f1{}practice}; the {\i homedir} is presumed.\par
\par
\pard{}In general, you should check that the files to be archived exist where you think they do (in the working directory) by running {\f1{}ls}.  Because you just created the directory and the files and have changed to that directory, you probably don't need to do that this time.\par
\par
\pard{}It is very important to make sure there isn't already a file in the working directory with the archive name you intend to use (in this case, {\f1{}collection.tar}), or that you don't care about its contents.  Whenever you use {\f1{}create}, {\f1{}tar} will erase the current contents of the file named by {\f1{}--file={\i archive-name}} ({\f1{}-f {\i archive-name}}) if it exists.  {\f1{}tar} will not tell you if you are about to overwrite a file unless you specify an option which does this .  To add files to an existing archive, you need to use a different option, such as {\f1{}--append} ({\f1{}-r}); see {\uldb append}{\v append} for information on how to do this.\par
\par
\page\pard Node: {\b Creating the archive}, \keepn Next: {\uldb create verbose}{\v create_verbose}, Prev: {\uldb prepare for examples}{\v prepare_for_examples}, Up: {\uldb create}{\v create}\line
K{\footnote K Creating the archive}
#{\footnote Creating_the_archive}
${\footnote \pard{}Creating the Archive}\par
\pard{\fs24\b Creating the Archive}\par
\par
\pard{}To place the files {\f1{}blues}, {\f1{}folk}, and {\f1{}jazz} into an archive named {\f1{}collection.tar}, use the following command:\par
\par
{\pard\keep\li720\f1{}$ tar --create --file=collection.tar blues folk jazz\par
\pard\f0{}}\par
\pard{}The order of the arguments is not very important, {\i when using long option forms}.  You could also say:\par
\par
{\pard\keep\li720\f1{}$ tar blues --create folk --file=collection.tar jazz\par
\pard\f0{}}\par
\pard{}However, you can see that this order is harder to understand; this is why we will list the arguments in the order that makes the commands easiest to understand (and we encourage you to do the same when you use {\f1{}tar}, to avoid errors).\par
\par
\pard{}Note that the part of the command which says, {\f1{}--file=collection.tar} is considered to be {\i one} argument.  If you substituted any other string of characters for {\f1{}`collection.tar'},  then that string would become the name of the archive file you create.\par
\par
\pard{}The order of the options becomes more important when you begin to use short forms.  With short forms, if you type commands in the wrong order (even if you type them correctly in all other ways), you may end up with results you don't expect.  For this reason, it is a good idea to get into the habit of typing options in the order that makes inherent sense.  See {\uldb short create}{\v short_create} for more information on this.\par
\par
\pard{}In this example, you type the command as shown above: {\f1{}--create} is the operation which creates the new archive ({\f1{}collection.tar}), and {\f1{}--file} is the option which lets you give it the name you chose.  The files, {\f1{}blues}, {\f1{}folk}, and {\f1{}jazz}, are now members of the archive, {\f1{}collection.tar} (they are \'A2file name arguments\'A2 to the {\f1{}--create} operation) .  Now that they are are in the archive, they are called {\i archive members}, not files .\par
\par
\pard{}When you create an archive, you {\i must} specify which files you want placed in the archive.  If you do not specify any archive members, GNU {\f1{}tar} will complain.\par
\par
\pard{}If you now list the contents of the working directory ({\f1{}ls}), you will find the archive file listed as well as the files you saw previously:\par
\par
{\pard\keep\li720\f1{}blues   folk   jazz   collection.tar\par
\pard\f0{}}\par
\pard{}Creating the archive {\f1{}collection.tar} did not destroy the copies of the files in the directory.\par
\par
\pard{}Keep in mind that if you don't indicate an operation, {\f1{}tar} will not run and will prompt you for one.  If you don't name any files, {\f1{}tar} will complain.  You must have write access to the working directory, or else you will not be able to create an archive in that directory.\par
\par
{\i \pard{}Caution}: Do not attempt to use {\f1{}--create} ({\f1{}-c}) to add files to an existing archive; it will delete the archive and write a new one.  Use {\f1{}--append} ({\f1{}-r}) instead.  See {\uldb append}{\v append}.\par
\par
\page\pard Node: {\b create verbose}, \keepn Next: {\uldb short create}{\v short_create}, Prev: {\uldb Creating the archive}{\v Creating_the_archive}, Up: {\uldb create}{\v create}\line
K{\footnote K create verbose}
#{\footnote create_verbose}
${\footnote \pard{}Running {\f1{}--create} with {\f1{}--verbose}}\par
\pard{\fs24\b Running {\f1{}--create} with {\f1{}--verbose}}\par
\par
\pard{}If you include the {\f1{}--verbose} ({\f1{}-v}) option on the command line, {\f1{}tar} will list the files it is acting on as it is working.  In verbose mode, the {\f1{}create} example above would appear as:\par
\par
{\pard\keep\li720\f1{}$ tar --create --verbose --file=collection.tar blues folk jazz\line
blues\line
folk\line
jazz\par
\pard\f0{}}\par
\pard{}This example is just like the example we showed which did not use {\f1{}--verbose}, except that {\f1{}tar} generated the remaining lines {.  }\par
\par
\pard{}In the rest of the examples in this chapter, we will frequently use {\f1{}verbose} mode so we can show actions or {\f1{}tar} responses that you would otherwise not see, and which are important for you to understand.\par
\par
\page\pard Node: {\b short create}, \keepn Next: {\uldb create dir}{\v create_dir}, Prev: {\uldb create verbose}{\v create_verbose}, Up: {\uldb create}{\v create}\line
K{\footnote K short create}
#{\footnote short_create}
${\footnote \pard{}Short Forms with {\f1{}create}}\par
\pard{\fs24\b Short Forms with {\f1{}create}}\par
\par
\pard{}As we said before, the {\f1{}--create} ({\f1{}-c}) operation is one of the most basic uses of {\f1{}tar}, and you will use it countless times.  Eventually, you will probably want to use abbreviated (or "short") forms of options.  A full discussion of the three different forms that options can take appears in {\uldb Styles}{\v Styles}; for now, here is what the previous example (including the {\f1{}--verbose} ({\f1{}-v}) option) looks like using short option forms:\par
\par
{\pard\keep\li720\f1{}$ tar -cvf collection.tar blues folk jazz\line
blues\line
folk\line
jazz\par
\pard\f0{}}\par
\pard{}As you can see, the system responds the same no matter whether you use long or short option forms.\par
\par
\pard{}One difference between using short and long option forms is that, although the exact placement of arguments following options is no more specific when using short forms, it is easier to become confused and make a mistake when using short forms.  For example, suppose you attempted the above example in the following way:\par
\par
{\pard\keep\li720\f1{}$ tar -cfv collection.tar blues folk jazz\par
\pard\f0{}}\par
\pard{}In this case, {\f1{}tar} will make an archive file called {\f1{}v}, containing the files {\f1{}blues}, {\f1{}folk}, and {\f1{}jazz}, because the {\f1{}v} is the closest "file name" to the {\f1{}-f} option, and is thus taken to be the chosen archive file name.  {\f1{}tar} will try to add a file called {\f1{}collection.tar} to the {\f1{}v} archive file; if the file {\f1{}collection.tar} did not already exist, {\f1{}tar} will report an error indicating that this file does not exist.  If the file {\f1{}collection.tar} does already exist (e.g., from a previous command you may have run), then {\f1{}tar} will add this file to the archive.  Because the {\f1{}-v} option did not get registered, {\f1{}tar} will not run under {\f1{}verbose} mode, and will not report its progress.\par
\par
\pard{}The end result is that you may be quite confused about what happened, and possibly overwrite a file.  To illustrate this further, we will show you how an example we showed previously would look using short forms.\par
\par
\pard{}This example,\par
\par
{\pard\keep\li720\f1{}$ tar blues --create folk --file=collection.tar jazz\par
\pard\f0{}}\par
\pard{}is confusing as it is.  When shown using short forms, however, it becomes much more so:\par
\par
{\pard\keep\li720\f1{}$ tar blues -c folk -f collection.tar jazz\par
\pard\f0{}}\par
\pard{}It would be very easy to put the wrong string of characters immediately following the {\f1{}-f}, but doing that could sacrifice valuable data.\par
\par
\pard{}For this reason, we recommend that you pay very careful attention to the order of options and placement of file and archive names, especially when using short option forms.  Not having the option name written out mnemonically can affect how well you remember which option does what, and therefore where different names have to be placed.  (Placing options in an unusual order can also cause {\f1{}tar} to report an error if you have set the shell environment variable, {\f1{}POSIXLY_CORRECT}; see {\uldb posix compliance}{\v posix_compliance} for more information on this.)\par
\par
\page\pard Node: {\b create dir}, \keepn Next: {\uldb }{\v }, Prev: {\uldb short create}{\v short_create}, Up: {\uldb create}{\v create}\line
K{\footnote K create dir}
#{\footnote create_dir}
${\footnote \pard{}Archiving Directories}\par
\pard{\fs24\b Archiving Directories}\par
\par
\pard{}{K{\footnote K Archiving Directories}}{K{\footnote K Directories, Archiving}}You can archive a directory by specifying its directory name as a file name argument to {\f1{}tar}.  The files in the directory will be archived relative to the working directory, and the directory will be re-created along with its contents when the archive is extracted.\par
\par
\pard{}To archive a directory, first move to its superior directory.  If you have followed the previous instructions in this tutorial, you should type:\par
\par
{\pard\keep\li720\f1{}$ cd ..\line
$\par
\pard\f0{}}\par
\pard{}This will put you into the directory which contains {\f1{}practice}, i.e. your home directory.  Once in the superior directory, you can specify the subdirectory, {\f1{}practice}, as a file name argument.  To store {\f1{}practice} in the new archive file {\f1{}music.tar}, type:\par
\par
{\pard\keep\li720\f1{}$ tar --create --verbose --file=music.tar practice\par
\pard\f0{}}\par
{\f1{}\pard{}tar} should output:\par
\par
{\pard\keep\li720\f1{}practice/\line
practice/blues\line
practice/folk\line
practice/jazz\line
practice/collection.tar\par
\pard\f0{}}\par
\pard{}Note that the archive thus created is not in the subdirectory {\f1{}practice}, but rather in the current working directory--the directory from which {\f1{}tar} was invoked.  Before trying to archive a directory from its superior directory, you should make sure you have write access to the superior directory itself, not only the directory you are trying archive with {\f1{}tar}.  For example, you will probably not be able to store your home directory in an archive by invoking {\f1{}tar} from the root directory; See {\uldb absolute}{\v absolute}.  (Note also that {\f1{}collection.tar}, the original archive file, has itself been archived.  {\f1{}tar} will accept any file as a file to be archived, regardless of its content.  When {\f1{}music.tar} is extracted, the archive file {\f1{}collection.tar} will be re-written into the file system).\par
\par
\pard{}If you give {\f1{}tar} a command such as\par
\par
{\pard\keep\li720\f1{}$ tar --create --file=foo.tar .\par
\pard\f0{}}\par
{\f1{}\pard{}tar} will report {\f1{}tar: foo.tar is the archive; not dumped}.  This happens because {\f1{}tar} creates the archive {\f1{}foo.tar} in the current directory before putting any files into it.  Then, when {\f1{}tar} attempts to add all the files in the directory {\f1{}.} to the archive, it notices that the file {\f1{}foo.tar} is the same as the archive, and skips it.  (It makes no sense to put an archive into itself.)  GNU {\f1{}tar} will continue in this case, and create the archive normally, except for the exclusion of that one file.  ({\i Please note:} Other versions of {\f1{}tar} are not so clever; they will enter an infinite loop when this happens, so you should not depend on this behavior unless you are certain you are running GNU {\f1{}tar}.  )\par
\par
\page\pard Node: {\b list}, \keepn Next: {\uldb extract}{\v extract}, Prev: {\uldb create}{\v create}, Up: {\uldb Tutorial}{\v Tutorial}\line
K{\footnote K list}
#{\footnote list}
${\footnote \pard{}How to List Archives}\par
\pard{\fs24\b How to List Archives}\par
\par
\pard{}Frequently, you will find yourself wanting to determine exactly what a particular archive contains.  You can use the {\f1{}--list} ({\f1{}-t}) operation to get the member names as they currently appear in the archive, as well as various attributes of the files at the time they were archived.  For example, you can examine the archive {\f1{}collection.tar} that you created in the last section with the command,\par
\par
{\pard\keep\li720\f1{}$ tar --list --file=collection.tar\par
\pard\f0{}}\par
\pard{}The output of {\f1{}tar} would then be:\par
\par
{\pard\keep\li720\f1{}blues\line
folk\line
jazz\par
\pard\f0{}}\par
\pard{}The archive {\f1{}bfiles.tar} would list as follows:\par
\par
{\pard\keep\li720\f1{}./birds\line
baboon\line
./box\par
\pard\f0{}}\par
\pard{}Be sure to use a {\f1{}--file={\i archive-name}} ({\f1{}-f {\i archive-name}}) option just as with {\f1{}--create} ({\f1{}-c}) to specify the name of the archive.\par
\par
\pard{}If you use the {\f1{}--verbose} ({\f1{}-v}) option with {\f1{}--list}, then {\f1{}tar} will print out a listing reminiscent of {\f1{}ls -l}, showing owner, file size, and so forth.\par
\par
\pard{}If you had used {\f1{}--verbose} ({\f1{}-v}) mode, the example above would look like:\par
\par
{\pard\keep\li720\f1{}$ tar --list --verbose --file=collection.tar folk\line
-rw-rw-rw- myself user 62 1990-05-23 10:55 folk\par
\pard\f0{}}\par
\pard{}{K{\footnote K File name arguments, using {\f1{}--list} with}}{K{\footnote K {\f1{}--list} with file name arguments}}You can specify one or more individual member names as arguments when using {\f1{}list}.  In this case, {\f1{}tar} will only list the names of members you identify.  For example, {\f1{}tar --list --file=afiles.tar apple} would only print {\f1{}apple}.\par
\par
\pard{}Because {\f1{}tar} preserves paths, file names must be specified as they appear in the archive (ie., relative to the directory from which the archive was created).  Therefore, it is essential when specifying member names to {\f1{}tar} that you give the exact member names.  For example, {\f1{}tar --list --file=bfiles birds} would produce an error message something like {\f1{}tar: birds: Not found in archive}, because there is no member named {\f1{}birds}, only one named {\f1{}./birds}.  While the names {\f1{}birds} and {\f1{}./birds} name the same file, {\i member} names are compared using a simplistic name comparison, in which an exact match is necessary.  See {\uldb absolute}{\v absolute}.\par
\par
\pard{}However, {\f1{}tar --list --file=collection.tar folk} would respond with {\f1{}folk}, because {\f1{}folk} is in the archive file {\f1{}collection.tar}.  If you are not sure of the exact file name, try listing all the files in the archive and searching for the one you expect to find; remember that if you use {\f1{}--list} with no file names as arguments, {\f1{}tar} will print the names of all the members stored in the specified archive.\par
\par
{\par
\pard\keep\fi-2880\li2880\tx2880{}{\uldb list dir}{\v list_dir}\tab\par
\pard{}}\par
\page\pard Node: {\b list dir}, \keepn Next: {\uldb }{\v }, Prev: {\uldb list}{\v list}, Up: {\uldb list}{\v list}\line
K{\footnote K list dir}
#{\footnote list_dir}
${\footnote \pard{}Listing the Contents of a Stored Directory}\par
\pard{\fs24\b Listing the Contents of a Stored Directory}\par
\par
{{{\i \pard\li720{}(This message will disappear, once this node revised.)}\par
\pard{}}}\par
\pard{}To get information about the contents of an archived directory, use the directory name as a file name argument in conjunction with {\f1{}--list} ({\f1{}-t}).  To find out file attributes, include the {\f1{}--verbose} ({\f1{}-v}) option.\par
\par
\pard{}For example, to find out about files in the directory {\f1{}practice}, in the archive file {\f1{}music.tar}, type:\par
\par
{\pard\keep\li720\f1{}$ tar --list --verbose --file=music.tar practice\par
\pard\f0{}}\par
{\f1{}\pard{}tar} responds:\par
\par
{\pard\keep\li720\f1{}drwxrwxrwx myself user 0 1990-05-31 21:49 practice/\line
-rw-rw-rw- myself user 42 1990-05-21 13:29 practice/blues\line
-rw-rw-rw- myself user 62 1990-05-23 10:55 practice/folk\line
-rw-rw-rw- myself user 40 1990-05-21 13:30 practice/jazz\line
-rw-rw-rw- myself user 10240 1990-05-31 21:49 practice/collection.tar\par
\pard\f0{}}\par
\pard{}When you use a directory name as a file name argument, {\f1{}tar} acts on all the files (including sub-directories) in that directory.\par
\par
\page\pard Node: {\b extract}, \keepn Next: {\uldb going further}{\v going_further}, Prev: {\uldb list}{\v list}, Up: {\uldb Tutorial}{\v Tutorial}\line
K{\footnote K extract}
#{\footnote extract}
${\footnote \pard{}How to Extract Members from an Archive}\par
\pard{\fs24\b How to Extract Members from an Archive}\par
\par
{{{\i \pard\li720{}(This message will disappear, once this node revised.)}\par
\pard{}}}\par
\pard{}{K{\footnote K Extraction}}{K{\footnote K Retrieving files from an archive}}{K{\footnote K Resurrecting files from an archive}} Creating an archive is only half the job--there is no point in storing files in an archive if you can't retrieve them.  The act of retrieving members from an archive so they can be used and manipulated as unarchived files again is called \'A2extraction\'A2.  To extract files from an archive, use the {\f1{}--extract} ({\f1{}--get}, {\f1{}-x}) operation.  As with {\f1{}--create} ({\f1{}-c}), specify the name of the archive with {\f1{}--file={\i archive-name}} ({\f1{}-f {\i archive-name}}).  Extracting an archive does not modify the archive in any way; you can extract it multiple times if you want or need to.\par
\par
\pard{}Using {\f1{}--extract}, you can extract an entire archive, or specific files.  The files can be directories containing other files, or not.  As with {\f1{}--create} ({\f1{}-c}) and {\f1{}--list} ({\f1{}-t}), you may use the short or the long form of the operation without affecting the performance.\par
\par
{\par
\pard\keep\fi-2880\li2880\tx2880{}{\uldb extracting archives}{\v extracting_archives}\tab \par
{\uldb extracting files}{\v extracting_files}\tab \par
{\uldb extract dir}{\v extract_dir}\tab \par
{\uldb failing commands}{\v failing_commands}\tab\par
\pard{}}\par
\page\pard Node: {\b extracting archives}, \keepn Next: {\uldb extracting files}{\v extracting_files}, Prev: {\uldb extract}{\v extract}, Up: {\uldb extract}{\v extract}\line
K{\footnote K extracting archives}
#{\footnote extracting_archives}
${\footnote \pard{}Extracting an Entire Archive}\par
\pard{\fs24\b Extracting an Entire Archive}\par
\par
\pard{}To extract an entire archive, specify the archive file name only, with no individual file names as arguments.  For example,\par
\par
{\pard\keep\li720\f1{}$ tar -xvf collection.tar\par
\pard\f0{}}\par
\pard{}produces this:\par
\par
{\pard\keep\li720\f1{}-rw-rw-rw- me user     28 1996-10-18 16:31 jazz\line
-rw-rw-rw- me user     21 1996-09-23 16:44 blues\line
-rw-rw-rw- me user     20 1996-09-23 16:44 folk\par
\pard\f0{}}\par
\page\pard Node: {\b extracting files}, \keepn Next: {\uldb extract dir}{\v extract_dir}, Prev: {\uldb extracting archives}{\v extracting_archives}, Up: {\uldb extract}{\v extract}\line
K{\footnote K extracting files}
#{\footnote extracting_files}
${\footnote \pard{}Extracting Specific Files}\par
\pard{\fs24\b Extracting Specific Files}\par
\par
\pard{}To extract specific archive members, give their exact member names as arguments, as printed by {\f1{}--list} ({\f1{}-t}).  If you had mistakenly deleted one of the files you had placed in the archive {\f1{}collection.tar} earlier (say, {\f1{}blues}), you can extract it from the archive without changing the archive's structure.  It will be identical to the original file {\f1{}blues} that you deleted.\par
\par
\pard{}First, make sure you are in the {\f1{}practice} directory, and list the files in the directory.  Now, delete the file, {\f1{}blues}, and list the files in the directory again.\par
\par
\pard{}You can now extract the member {\f1{}blues} from the archive file {\f1{}collection.tar} like this:\par
\par
{\pard\keep\li720\f1{}$ tar --extract --file=collection.tar blues\par
\pard\f0{}}\par
\pard{}If you list the files in the directory again, you will see that the file {\f1{}blues} has been restored, with its original permissions, creation times, and owner.   (These parameters will be identical to those which the file had when you originally placed it in the archive; any changes you may have made before deleting the file from the file system, however, will {\i not} have been made to the archive member.)  The archive file, {\f1{}collection.tar}, is the same as it was before you extracted {\f1{}blues}.  You can confirm this by running {\f1{}tar} with {\f1{}--list} ({\f1{}-t}).\par
\par
\pard{}Remember that as with other operations, specifying the exact member name is important.  {\f1{}tar --extract --file=bfiles.tar birds} will fail, because there is no member named {\f1{}birds}.  To extract the member named {\f1{}./birds}, you must specify {\f1{}tar --extract --file=bfiles.tar ./birds}.  To find the exact member names of the members of an archive, use {\f1{}--list} ({\f1{}-t}) (see {\uldb list}{\v list}).\par
\par
\pard{}If you give the {\f1{}--verbose} ({\f1{}-v}) option, then {\f1{}--extract} ({\f1{}--get}, {\f1{}-x}) will print the names of the archive members as it extracts them.\par
\par
\page\pard Node: {\b extract dir}, \keepn Next: {\uldb failing commands}{\v failing_commands}, Prev: {\uldb extracting files}{\v extracting_files}, Up: {\uldb extract}{\v extract}\line
K{\footnote K extract dir}
#{\footnote extract_dir}
${\footnote \pard{}Extracting Files that are Directories}\par
\pard{\fs24\b Extracting Files that are Directories}\par
\par
\pard{}Extracting directories which are members of an archive is similar to extracting other files.  The main difference to be aware of is that if the extracted directory has the same name as any directory already in the working directory, then files in the extracted directory will be placed into the directory of the same name.  Likewise, if there are files in the pre-existing directory with the same names as the members which you extract, the files from the extracted archive will overwrite the files already in the working directory (and possible subdirectories).  This will happen regardless of whether or not the files in the working directory were more recent than those extracted.\par
\par
\pard{}However, if a file was stored with a directory name as part of its file name, and that directory does not exist under the working directory when the file is extracted, {\f1{}tar} will create the directory.\par
\par
\pard{}We can demonstrate how to use {\f1{}--extract} to extract a directory file with an example.  Change to the {\f1{}practice} directory if you weren't there, and remove the files {\f1{}folk} and {\f1{}jazz}.  Then, go back to the parent directory and extract the archive {\f1{}music.tar}.  You may either extract the entire archive, or you may extract only the files you just deleted.  To extract the entire archive, don't give any file names as arguments after the archive name {\f1{}music.tar}.  To extract only the files you deleted, use the following command:\par
\par
{\pard\keep\li720\f1{}$ tar -xvf music.tar practice/folk practice/jazz\par
\pard\f0{}}\par
\pard{}Because you created the directory with {\f1{}practice} as part of the file names of each of the files by archiving the {\f1{}practice} directory as {\f1{}practice}, you must give {\f1{}practice} as part of the file names when you extract those files from the archive.\par
\par
\page\pard Node: {\b failing commands}, \keepn Next: {\uldb }{\v }, Prev: {\uldb extract dir}{\v extract_dir}, Up: {\uldb extract}{\v extract}\line
K{\footnote K failing commands}
#{\footnote failing_commands}
${\footnote \pard{}Commands That Will Fail}\par
\pard{\fs24\b Commands That Will Fail}\par
\par
\pard{}Here are some sample commands you might try which will not work, and why they won't work.\par
\par
\pard{}If you try to use this command,\par
\par
{\pard\keep\li720\f1{}$ tar -xvf music.tar folk jazz\par
\pard\f0{}}\par
\pard{}you will get the following response:\par
\par
{\pard\keep\li720\f1{}tar: folk: Not found in archive\line
tar: jazz: Not found in archive\line
$\par
\pard\f0{}}\par
\pard{}This is because these files were not originally {\i in} the parent directory {\f1{}..}, where the archive is located; they were in the {\f1{}practice} directory, and their file names reflect this:\par
\par
{\pard\keep\li720\f1{}$ tar -tvf music.tar\line
practice/folk\line
practice/jazz\line
practice/rock\par
\pard\f0{}}\par
\pard{}Likewise, if you try to use this command,\par
\par
{\pard\keep\li720\f1{}$ tar -tvf music.tar folk jazz\par
\pard\f0{}}\par
\pard{}you would get a similar response.  Members with those names are not in the archive.  You must use the correct member names in order to extract the files from the archive.\par
\par
\pard{}If you have forgotten the correct names of the files in the archive, use {\f1{}tar --list --verbose} to list them correctly.\par
\par
\page\pard Node: {\b going further}, \keepn Next: {\uldb }{\v }, Prev: {\uldb extract}{\v extract}, Up: {\uldb Tutorial}{\v Tutorial}\line
K{\footnote K going further}
#{\footnote going_further}
${\footnote \pard{}Going Further Ahead in this Manual}\par
\pard{\fs24\b Going Further Ahead in this Manual}\par
\par
\page\pard Node: {\b tar invocation}, \keepn Next: {\uldb operations}{\v operations}, Prev: {\uldb Tutorial}{\v Tutorial}, Up: {\uldb Top}{\v Top}\line
K{\footnote K tar invocation}
#{\footnote tar_invocation}
${\footnote \pard{}Invoking GNU {\f1{}tar}}\par
\pard{\fs24\b Invoking GNU {\f1{}tar}}\par
\par
{{{\i \pard\li720{}(This message will disappear, once this node revised.)}\par
\pard{}}}\par
\pard{}This chapter is about how one invokes the GNU {\f1{}tar} command, from the command synopsis (see {\uldb Synopsis}{\v Synopsis}).  There are numerous options, and many styles for writing them.  One mandatory option specifies the operation {\f1{}tar} should perform (see {\uldb Operation Summary}{\v Operation_Summary}), other options are meant to detail how this operation should be performed (see {\uldb Option Summary}{\v Option_Summary}).  Non-option arguments are not always interpreted the same way, depending on what the operation is.\par
\par
\pard{}You will find in this chapter everything about option styles and rules for writing them (see {\uldb Styles}{\v Styles}).  On the other hand, operations and options are fully described elsewhere, in other chapters.  Here, you will find only synthetic descriptions for operations and options, together with pointers to other parts of the {\f1{}tar} manual.\par
\par
\pard{}Some options are so special they are fully described right in this chapter.  They have the effect of inhibiting the normal operation of {\f1{}tar} or else, they globally alter the amount of feedback the user receives about what is going on.  These are the {\f1{}--help} and {\f1{}--version} (see {\uldb help}{\v help}), {\f1{}--verbose} ({\f1{}-v}) (see {\uldb verbose}{\v verbose}) and {\f1{}--interactive} ({\f1{}-w}) options (see {\uldb interactive}{\v interactive}).\par
\par
{\par
\pard\keep\fi-2880\li2880\tx2880{}{\uldb Synopsis}{\v Synopsis}\tab \par
{\uldb using tar options}{\v using_tar_options}\tab \par
{\uldb Styles}{\v Styles}\tab \par
{\uldb All Options}{\v All_Options}\tab \par
{\uldb help}{\v help}\tab \par
{\uldb verbose}{\v verbose}\tab \par
{\uldb interactive}{\v interactive}\tab\par
\pard{}}\par
\page\pard Node: {\b Synopsis}, \keepn Next: {\uldb using tar options}{\v using_tar_options}, Prev: {\uldb tar invocation}{\v tar_invocation}, Up: {\uldb tar invocation}{\v tar_invocation}\line
K{\footnote K Synopsis}
#{\footnote Synopsis}
${\footnote \pard{}General Synopsis of {\f1{}tar}}\par
\pard{\fs24\b General Synopsis of {\f1{}tar}}\par
\par
\pard{}The GNU {\f1{}tar} program is invoked as either one of:\par
\par
{\pard\keep\li720\f1{}tar {\i option}... [{\i name}]...\line
tar {\i letter}... [{\i argument}]... [{\i option}]... [{\i name}]...\par
\pard\f0{}}\par
\pard{}The second form is for when old options are being used.\par
\par
\pard{}You can use {\f1{}tar} to store files in an archive, to extract them from an archive, and to do other types of archive manipulation.  The primary argument to {\f1{}tar}, which is called the \'A2operation\'A2, specifies which action to take.  The other arguments to {\f1{}tar} are either \'A2options\'A2, which change the way {\f1{}tar} performs an operation, or file names or archive members, which specify the files or members {\f1{}tar} is to act on.\par
\par
\pard{}You can actually type in arguments in any order, even if in this manual the options always precede the other arguments, to make examples easier to understand.  Further, the option stating the main operation mode (the {\f1{}tar} main command) is usually given first.\par
\par
\pard{}Each {\i name} in the synopsis above is interpreted as an archive member name when the main command is one of {\f1{}--compare} ({\f1{}--diff}, {\f1{}-d}), {\f1{}--delete}, {\f1{}--extract} ({\f1{}--get}, {\f1{}-x}), {\f1{}--list} ({\f1{}-t}) or {\f1{}--update} ({\f1{}-u}).  When naming archive members, you must give the exact name of the member in the archive, as it is printed by {\f1{}--list} ({\f1{}-t}).  For {\f1{}--append} ({\f1{}-r}) and {\f1{}--create} ({\f1{}-c}), these {\i name} arguments specify the names of either files or directory hierarchies to place in the archive.  These files or hierarchies should already exist in the file system, prior to the execution of the {\f1{}tar} command.\par
\par
{\f1{}\pard{}tar} interprets relative file names as being relative to the working directory.  {\f1{}tar} will make all file names relative (by removing leading slashes when archiving or restoring files), unless you specify otherwise (using the {\f1{}--absolute-names} ({\f1{}-P}) option).  See {\uldb absolute}{\v absolute}, for more information about {\f1{}--absolute-names} ({\f1{}-P}).\par
\par
\pard{}If you give the name of a directory as either a file name or a member name, then {\f1{}tar} acts recursively on all the files and directories beneath that directory.  For example, the name {\f1{}/} identifies all the files in the filesystem to {\f1{}tar}.\par
\par
\pard{}The distinction between file names and archive member names is especially important when shell globbing is used, and sometimes a source of confusion for newcomers.  See {\uldb Wildcards}{\v Wildcards}, for more information about globbing.  The problem is that shells may only glob using existing files in the file system.  Only {\f1{}tar} itself may glob on archive members, so when needed, you must ensure that wildcard characters reach {\f1{}tar} without being interpreted by the shell first.  Using a backslash before {\f1{}*} or {\f1{}?}, or putting the whole argument between quotes, is usually sufficient for this.\par
\par
\pard{}Even if {\i name}s are often specified on the command line, they can also be read from a text file in the file system, using the {\f1{}--files-from={\i file-of-names}} ({\f1{}-T {\i file-of-names}}) option.\par
\par
\pard{}If you don't use any file name arguments, {\f1{}--append} ({\f1{}-r}), {\f1{}--delete} and {\f1{}--concatenate} ({\f1{}--catenate}, {\f1{}-A}) will do nothing, while {\f1{}--create} ({\f1{}-c}) will usually yield a diagnostic and inhibit {\f1{}tar} execution.  The other operations of {\f1{}tar} ({\f1{}--list} ({\f1{}-t}), {\f1{}--extract} ({\f1{}--get}, {\f1{}-x}), {\f1{}--compare} ({\f1{}--diff}, {\f1{}-d}), and {\f1{}--update} ({\f1{}-u})) will act on the entire contents of the archive.\par
\par
\pard{}{K{\footnote K exit status}}{K{\footnote K return status}}Besides successful exits, GNU {\f1{}tar} may fail for many reasons.  Some reasons correspond to bad usage, that is, when the {\f1{}tar} command is improperly written.  Errors may be encountered later, while encountering an error processing the archive or the files.  Some errors are recoverable, in which case the failure is delayed until {\f1{}tar} has completed all its work.  Some errors are such that it would not meaningful, or at least risky, to continue processing: {\f1{}tar} then aborts processing immediately.  All abnormal exits, whether immediate or delayed, should always be clearly diagnosed on {\f1{}stderr}, after a line stating the nature of the error.\par
\par
\pard{}GNU {\f1{}tar} returns only a few exit statuses.  I'm really aiming simplicity in that area, for now.  If you are not using the {\f1{}--compare} ({\f1{}--diff}, {\f1{}-d}) option, zero means that everything went well, besides maybe innocuous warnings.  Nonzero means that something went wrong.  Right now, as of today, "nonzero" is almost always 2, except for remote operations, where it may be 128.\par
\par
\page\pard Node: {\b using tar options}, \keepn Next: {\uldb Styles}{\v Styles}, Prev: {\uldb Synopsis}{\v Synopsis}, Up: {\uldb tar invocation}{\v tar_invocation}\line
K{\footnote K using tar options}
#{\footnote using_tar_options}
${\footnote \pard{}Using {\f1{}tar} Options}\par
\pard{\fs24\b Using {\f1{}tar} Options}\par
\par
\pard{}GNU {\f1{}tar} has a total of eight operating modes which allow you to perform a variety of tasks.  You are required to choose one operating mode each time you employ the {\f1{}tar} program by specifying one, and only one operation as an argument to the {\f1{}tar} command (two lists of four operations each may be found at {\uldb frequent operations}{\v frequent_operations} and {\uldb Operations}{\v Operations}).  Depending on circumstances, you may also wish to customize how the chosen operating mode behaves.  For example, you may wish to change the way the output looks, or the format of the files that you wish to archive may require you to do something special in order to make the archive look right.\par
\par
\pard{}You can customize and control {\f1{}tar}'s performance by running {\f1{}tar} with one or more options (such as {\f1{}--verbose} ({\f1{}-v}), which we used in the tutorial).  As we said in the tutorial, \'A2options\'A2 are arguments to {\f1{}tar} which are (as their name suggests) optional.  Depending on the operating mode, you may specify one or more options.  Different options will have different effects, but in general they all change details of the operation, such as archive format, archive name, or level of user interaction.  Some options make sense with all operating modes, while others are meaningful only with particular modes.  You will likely use some options frequently, while you will only use others infrequently, or not at all.  (A full list of options is available in see {\uldb All Options}{\v All_Options}.)\par
\par
\pard{}Note that {\f1{}tar} options are case sensitive.  For example, the options {\f1{}-T} and {\f1{}-t} are different; the first requires an argument for stating the name of a file providing a list of {\i name}s, while the second does not require an argument and is another way to write {\f1{}--list} ({\f1{}-t}).\par
\par
\pard{}In addition to the eight operations, there are many options to {\f1{}tar}, and three different styles for writing both: long (mnemonic) form, short form, and old style.  These styles are discussed below.  Both the options and the operations can be written in any of these three styles.\par
\par
\page\pard Node: {\b Styles}, \keepn Next: {\uldb All Options}{\v All_Options}, Prev: {\uldb using tar options}{\v using_tar_options}, Up: {\uldb tar invocation}{\v tar_invocation}\line
K{\footnote K Styles}
#{\footnote Styles}
${\footnote \pard{}The Three Option Styles}\par
\pard{\fs24\b The Three Option Styles}\par
\par
\pard{}There are three styles for writing operations and options to the command line invoking {\f1{}tar}.  The different styles were developed at different times during the history of {\f1{}tar}.  These styles will be presented below, from the most recent to the oldest.\par
\par
\pard{}Some options must take an argument.  (For example, {\f1{}--file={\i archive-name}} ({\f1{}-f {\i archive-name}}) takes the name of an archive file as an argument.  If you do not supply an archive file name, {\f1{}tar} will use a default, but this can be confusing; thus, we recommend that you always supply a specific archive file name.)  Where you {\i place} the arguments generally depends on which style of options you choose.  We will detail specific information relevant to each option style in the sections on the different option styles, below.  The differences are subtle, yet can often be very important; incorrect option placement can cause you to overwrite a number of important files.  We urge you to note these differences, and only use the option style(s) which makes the most sense to you until you feel comfortable with the others.\par
\par
{\par
\pard\keep\fi-2880\li2880\tx2880{}{\uldb Mnemonic Options}{\v Mnemonic_Options}\tab Mnemonic Option Style\par
{\uldb Short Options}{\v Short_Options}\tab Short Option Style\par
{\uldb Old Options}{\v Old_Options}\tab Old Option Style\par
{\uldb Mixing}{\v Mixing}\tab Mixing Option Styles\par
\pard{}}\par
\page\pard Node: {\b Mnemonic Options}, \keepn Next: {\uldb Short Options}{\v Short_Options}, Prev: {\uldb Styles}{\v Styles}, Up: {\uldb Styles}{\v Styles}\line
K{\footnote K Mnemonic Options}
#{\footnote Mnemonic_Options}
${\footnote \pard{}Mnemonic Option Style}\par
\pard{\fs24\b Mnemonic Option Style}\par
\par
\pard{}Each option has at least one long (or mnemonic) name starting with two dashes in a row, e.g. {\f1{}list}.  The long names are more clear than their corresponding short or old names.  It sometimes happens that a single mnemonic option has many different different names which are synonymous, such as {\f1{}--compare} and {\f1{}--diff}.  In addition, long option names can be given unique abbreviations.  For example, {\f1{}--cre} can be used in place of {\f1{}--create} because there is no other mnemonic option which begins with {\f1{}cre}.  (One way to find this out is by trying it and seeing what happens; if a particular abbreviation could represent more than one option, {\f1{}tar} will tell you that that abbreviation is ambiguous and you'll know that that abbreviation won't work.  You may also choose to run {\f1{}tar --help} to see a list of options.  Be aware that if you run {\f1{}tar} with a unique abbreviation for the long name of an option you didn't want to use, you are stuck; {\f1{}tar} will perform the command as ordered.)\par
\par
\pard{}Mnemonic options are meant to be obvious and easy to remember, and their meanings are generally easier to discern than those of their corresponding short options (see below).  For example:\par
\par
{\pard\keep\li720\f1{}$ tar --create --verbose --blocking-factor=20 --file=/dev/rmt0\par
\pard\f0{}}\par
\pard{}gives a fairly good set of hints about what the command does, even for those not fully acquainted with {\f1{}tar}.\par
\par
\pard{}Mnemonic options which require arguments take those arguments immediately following the option name; they are introduced by an equal sign.  For example, the {\f1{}--file} option (which tells the name of the {\f1{}tar} archive) is given a file such as {\f1{}archive.tar} as argument by using the notation {\f1{}--file=archive.tar} for the mnemonic option.\par
\par
\page\pard Node: {\b Short Options}, \keepn Next: {\uldb Old Options}{\v Old_Options}, Prev: {\uldb Mnemonic Options}{\v Mnemonic_Options}, Up: {\uldb Styles}{\v Styles}\line
K{\footnote K Short Options}
#{\footnote Short_Options}
${\footnote \pard{}Short Option Style}\par
\pard{\fs24\b Short Option Style}\par
\par
\pard{}Most options also have a short option name.  Short options start with a single dash, and are followed by a single character, e.g. {\f1{}-t} (which is equivalent to {\f1{}--list}).  The forms are absolutely identical in function; they are interchangeable.\par
\par
\pard{}The short option names are faster to type than long option names.\par
\par
\pard{}Short options which require arguments take their arguments immediately following the option, usually separated by white space.  It is also possible to stick the argument right after the short option name, using no intervening space.  For example, you might write {\f1{}-f archive.tar} or {\f1{}-farchive.tar} instead of using {\f1{}--file=archive.tar}.  Both {\f1{}--file={\i archive-name}} and {\f1{}-f {\i archive-name}} denote the option which indicates a specific archive, here named {\f1{}archive.tar}.\par
\par
\pard{}Short options' letters may be clumped together, but you are not required to do this (as compared to old options; see below).  When short options are clumped as a set, use one (single) dash for them all, e.g.  {\f1{}{\f1{}tar} -cvf}.  Only the last option in such a set is allowed to have an argument({\ul 1}{\v Short_Options_1}).\par
\par
\pard{}When the options are separated, the argument for each option which requires an argument directly follows that option, as is usual for Unix programs.  For example:\par
\par
{\pard\keep\li720\f1{}$ tar -c -v -b 20 -f /dev/rmt0\par
\pard\f0{}}\par
\pard{}If you reorder short options' locations, be sure to move any arguments that belong to them.  If you do not move the arguments properly, you may end up overwriting files.\par
\par
\page\pard#{\footnote Short_Options_1}
\pard{}(1) Clustering many options, the last of which has an argument, is a rather opaque way to write options.  Some wonder if GNU {\f1{}getopt} should not even be made helpful enough for considering such usages as invalid.\par
\par
\page\pard Node: {\b Old Options}, \keepn Next: {\uldb Mixing}{\v Mixing}, Prev: {\uldb Short Options}{\v Short_Options}, Up: {\uldb Styles}{\v Styles}\line
K{\footnote K Old Options}
#{\footnote Old_Options}
${\footnote \pard{}Old Option Style}\par
\pard{\fs24\b Old Option Style}\par
\par
{{{\i \pard\li720{}(This message will disappear, once this node revised.)}\par
\pard{}}}\par
\pard{}Like short options, old options are single letters.  However, old options must be written together as a single clumped set, without spaces separating them or dashes preceding them({\ul 1}{\v Old_Options_1}).  This set of letters must be the first to appear on the command line, after the {\f1{}tar} program name and some whitespace; old options cannot appear anywhere else.  The letter of an old option is exactly the same letter as the corresponding short option.  For example, the old option {\f1{}t} is the same as the short option {\f1{}-t}, and consequently, the same as the mnemonic option {\f1{}--list}.  So for example, the command {\f1{}tar cv} specifies the option {\f1{}-v} in addition to the operation {\f1{}-c}.\par
\par
\pard{}When options that need arguments are given together with the command, all the associated arguments follow, in the same order as the options.  Thus, the example given previously could also be written in the old style as follows:\par
\par
{\pard\keep\li720\f1{}$ tar cvbf 20 /dev/rmt0\par
\pard\f0{}}\par
\pard{}Here, {\f1{}20} is the argument of {\f1{}-b} and {\f1{}/dev/rmt0} is the argument of {\f1{}-f}.\par
\par
\pard{}On the other hand, this old style syntax makes it difficult to match option letters with their corresponding arguments, and is often confusing.  In the command {\f1{}tar cvbf 20 /dev/rmt0}, for example, {\f1{}20} is the argument for {\f1{}-b}, {\f1{}/dev/rmt0} is the argument for {\f1{}-f}, and {\f1{}-v} does not have a corresponding argument.  Even using short options like in {\f1{}tar -c -v -b 20 -f /dev/rmt0} is clearer, putting all arguments next to the option they pertain to.\par
\par
\pard{}If you want to reorder the letters in the old option argument, be sure to reorder any corresponding argument appropriately.\par
\par
\pard{}This old way of writing {\f1{}tar} options can surprise even experienced users.  For example, the two commands:\par
\par
{\pard\keep\li720\f1{}tar cfz archive.tar.gz file\line
tar -cfz archive.tar.gz file\par
\pard\f0{}}\par
\pard{}are quite different.  The first example uses {\f1{}archive.tar.gz} as the value for option {\f1{}f} and recognizes the option {\f1{}z}.  The second example, however, uses {\f1{}z} as the value for option {\f1{}f}--probably not what was intended.\par
\par
\pard{}Old options are kept for compatibility with old versions of {\f1{}tar}.\par
\par
\pard{}This second example could be corrected in many ways, among which the following are equivalent:\par
\par
{\pard\keep\li720\f1{}tar -czf archive.tar.gz file\line
tar -cf archive.tar.gz -z file\line
tar cf archive.tar.gz -z file\par
\pard\f0{}}\par
\pard{}{K{\footnote K option syntax, traditional}}As far as we know, all {\f1{}tar} programs, GNU and non-GNU, support old options.  GNU {\f1{}tar} supports them not only for historical reasons, but also because many people are used to them.  For compatibility with Unix {\f1{}tar}, the first argument is always treated as containing command and option letters even if it doesn't start with {\f1{}-}.  Thus, {\f1{}tar c} is equivalent to {\f1{}tar -c}: both of them specify the {\f1{}--create} ({\f1{}-c}) command to create an archive.\par
\par
\page\pard#{\footnote Old_Options_1}
\pard{}(1) Beware that if you precede options with a dash, you are announcing the short option style instead of the old option style; short options are decoded differently.\par
\par
\page\pard Node: {\b Mixing}, \keepn Next: {\uldb }{\v }, Prev: {\uldb Old Options}{\v Old_Options}, Up: {\uldb Styles}{\v Styles}\line
K{\footnote K Mixing}
#{\footnote Mixing}
${\footnote \pard{}Mixing Option Styles}\par
\pard{\fs24\b Mixing Option Styles}\par
\par
\pard{}All three styles may be intermixed in a single {\f1{}tar} command, so long as the rules for each style are fully respected({\ul 1}{\v Mixing_1}).  Old style options and either of the modern styles of options may be mixed within a single {\f1{}tar} command.  However, old style options must be introduced as the first arguments only, following the rule for old options (old options must appear directly after the {\f1{}tar} command and some whitespace).  Modern options may be given only after all arguments to the old options have been collected.  If this rule is not respected, a modern option might be falsely interpreted as the value of the argument to one of the old style options.\par
\par
\pard{}For example, all the following commands are wholly equivalent, and illustrate the many combinations and orderings of option styles.\par
\par
{\pard\keep\li720\f1{}tar --create --file=archive.tar\line
tar --create -f archive.tar\line
tar --create -farchive.tar\line
tar --file=archive.tar --create\line
tar --file=archive.tar -c\line
tar -c --file=archive.tar\line
tar -c -f archive.tar\line
tar -c -farchive.tar\line
tar -cf archive.tar\line
tar -cfarchive.tar\line
tar -f archive.tar --create\line
tar -f archive.tar -c\line
tar -farchive.tar --create\line
tar -farchive.tar -c\line
tar c --file=archive.tar\line
tar c -f archive.tar\line
tar c -farchive.tar\line
tar cf archive.tar\line
tar f archive.tar --create\line
tar f archive.tar -c\line
tar fc archive.tar\par
\pard\f0{}}\par
\pard{}On the other hand, the following commands are {\i not} equivalent to the previous set:\par
\par
{\pard\keep\li720\f1{}tar -f -c archive.tar\line
tar -fc archive.tar\line
tar -fcarchive.tar\line
tar -farchive.tarc\line
tar cfarchive.tar\par
\pard\f0{}}\par
\pard{}These last examples mean something completely different from what the user intended (judging based on the example in the previous set which uses long options, whose intent is therefore very clear).  The first four specify that the {\f1{}tar} archive would be a file named {\f1{}-c}, {\f1{}c}, {\f1{}carchive.tar} or {\f1{}archive.tarc}, respectively.  The first two examples also specify a single non-option, {\i name} argument having the value {\f1{}archive.tar}.  The last example contains only old style option letters (repeating option {\f1{}c} twice), not all of which are meaningful (eg., {\f1{}.}, {\f1{}h}, or {\f1{}i}), with no argument value.\par
\par
\page\pard#{\footnote Mixing_1}
\pard{}(1) Before GNU {\f1{}tar} version 1.11.6, a bug prevented intermixing old style options with mnemonic options in some cases.\par
\par
\page\pard Node: {\b All Options}, \keepn Next: {\uldb help}{\v help}, Prev: {\uldb Styles}{\v Styles}, Up: {\uldb tar invocation}{\v tar_invocation}\line
K{\footnote K All Options}
#{\footnote All_Options}
${\footnote \pard{}All {\f1{}tar} Options}\par
\pard{\fs24\b All {\f1{}tar} Options}\par
\par
\pard{}The coming manual sections contain an alphabetical listing of all {\f1{}tar} operations and options, with brief descriptions and cross references to more in-depth explanations in the body of the manual.  They also contain an alphabetically arranged table of the short option forms with their corresponding long option.  You can use this table as a reference for deciphering {\f1{}tar} commands in scripts.\par
\par
{\par
\pard\keep\fi-2880\li2880\tx2880{}{\uldb Operation Summary}{\v Operation_Summary}\tab \par
{\uldb Option Summary}{\v Option_Summary}\tab \par
{\uldb Short Option Summary}{\v Short_Option_Summary}\tab\par
\pard{}}\par
\page\pard Node: {\b Operation Summary}, \keepn Next: {\uldb Option Summary}{\v Option_Summary}, Prev: {\uldb All Options}{\v All_Options}, Up: {\uldb All Options}{\v All_Options}\line
K{\footnote K Operation Summary}
#{\footnote Operation_Summary}
${\footnote \pard{}Operations}\par
\pard{\fs24\b Operations}\par
\par
{\pard{}{\f1{}--append}\par
\pard{}{\f1{}-r}\par
\pard\li720{}Appends files to the end of the archive.  See {\uldb append}{\v append}.\par
\par
\pard{}{\f1{}--catenate}\par
\pard{}{\f1{}-A}\par
\pard\li720{}Same as {\f1{}--concatenate}.  See {\uldb concatenate}{\v concatenate}.\par
\par
\pard{}{\f1{}--compare}\par
\pard{}{\f1{}-d}\par
\pard\li720{}Compares archive members with their counterparts in the file system, and reports differences in file size, mode, owner, modification date and contents.  See {\uldb compare}{\v compare}.\par
\par
\pard{}{\f1{}--concatenate}\par
\pard{}{\f1{}-A}\par
\pard\li720{}Appends other {\f1{}tar} archives to the end of the archive.  See {\uldb concatenate}{\v concatenate}.\par
\par
\pard{}{\f1{}--create}\par
\pard{}{\f1{}-c}\par
\pard\li720{}Creates a new {\f1{}tar} archive.  See {\uldb create}{\v create}.\par
\par
\pard{}{\f1{}--delete}\par
\pard\li720{}Deletes members from the archive.  Don't try this on a archive on a tape!  See {\uldb delete}{\v delete}.\par
\par
\pard{}{\f1{}--diff}\par
\pard{}{\f1{}-d}\par
\pard\li720{}Same {\f1{}--compare}.  See {\uldb compare}{\v compare}.\par
\par
\pard{}{\f1{}--extract}\par
\pard{}{\f1{}-x}\par
\pard\li720{}Extracts members from the archive into the file system.  See {\uldb extract}{\v extract}.\par
\par
\pard{}{\f1{}--get}\par
\pard{}{\f1{}-x}\par
\pard\li720{}Same as {\f1{}--extract}.   See {\uldb extract}{\v extract}.\par
\par
\pard{}{\f1{}--list}\par
\pard{}{\f1{}-t}\par
\pard\li720{}Lists the members in an archive.  See {\uldb list}{\v list}.\par
\par
\pard{}{\f1{}--update}\par
\pard{}{\f1{}-u}\par
\pard\li720{}Adds files to the end of the archive, but only if they are newer than their counterparts already in the archive, or if they do not already exist in the archive.  See {\uldb update}{\v update}.\par
\par
\pard{}}\par
\page\pard Node: {\b Option Summary}, \keepn Next: {\uldb Short Option Summary}{\v Short_Option_Summary}, Prev: {\uldb Operation Summary}{\v Operation_Summary}, Up: {\uldb All Options}{\v All_Options}\line
K{\footnote K Option Summary}
#{\footnote Option_Summary}
${\footnote {\f1{}\pard{}tar} Options}\par
\pard{\fs24\b {\f1{}tar} Options}\par
\par
{\pard{}{\f1{}--absolute-names}\par
\pard{}{\f1{}-P}\par
\pard\li720{}Normally when creating an archive, {\f1{}tar} strips an initial {\f1{}/} from member names.  This option disables that behavior.  .\par
\par
\pard{}{\f1{}--after-date}\par
\pard\li720{}(See {\f1{}--newer}; .)\par
\par
\pard{}{\f1{}--atime-preserve}\par
\pard\li720{}Tells {\f1{}tar} to preserve the access time field in a file's inode when dumping it.  .\par
\par
\pard{}{\f1{}--backup={\i backup-type}}\par
\pard\li720{}Rather than deleting files from the file system, {\f1{}tar} will back them up using simple or numbered backups, depending upon {\i backup-type}.  .\par
\par
\pard{}{\f1{}--block-number}\par
\pard{}{\f1{}-R}\par
\pard\li720{}With this option present, {\f1{}tar} prints error messages for read errors with the block number in the archive file.  .\par
\par
\pard{}{\f1{}--blocking-factor={\i blocking}}\par
\pard{}{\f1{}-b {\i blocking}}\par
\pard\li720{}Sets the blocking factor {\f1{}tar} uses to {\i blocking} x 512 bytes per record.  .\par
\par
\pard{}{\f1{}--checkpoint}\par
\pard\li720{}This option directs {\f1{}tar} to print periodic checkpoint messages as it reads through the archive.  Its intended for when you want a visual indication that {\f1{}tar} is still running, but don't want to see {\f1{}--verbose} output.  .\par
\par
\pard{}{\f1{}--compress}\par
\pard{}{\f1{}--uncompress}\par
\pard{}{\f1{}-Z}\par
{\f1{}\pard\li720{}tar} will use the {\f1{}compress} program when reading or writing the archive.  This allows you to directly act on archives while saving space.  .\par
\par
\pard{}{\f1{}--confirmation}\par
\pard\li720{}(See {\f1{}--interactive};  .)\par
\par
\pard{}{\f1{}--dereference}\par
\pard{}{\f1{}-h}\par
\pard\li720{}When creating a {\f1{}tar} archive, {\f1{}tar} will archive the file that a symbolic link points to, rather than archiving the symlink.  .\par
\par
\pard{}{\f1{}--directory={\i dir}}\par
\pard{}{\f1{}-C {\i dir}}\par
\pard\li720{}When this option is specified, {\f1{}tar} will change its current directory to {\i dir} before performing any operations.  When this option is used during archive creation, it is order sensitive.  .\par
\par
\pard{}{\f1{}--exclude={\i pattern}}\par
\pard\li720{}When performing operations, {\f1{}tar} will skip files that match {\i pattern}.  .\par
\par
\pard{}{\f1{}--exclude-from={\i file}}\par
\pard{}{\f1{}-X {\i file}}\par
\pard\li720{}Similar to {\f1{}--exclude}, except {\f1{}tar} will use the list of patterns in the file {\i file}.  .\par
\par
\pard{}{\f1{}--file={\i archive}}\par
\pard{}{\f1{}-f {\i archive}}\par
{\f1{}\pard\li720{}tar} will use the file {\i archive} as the {\f1{}tar} archive it performs operations on, rather than {\f1{}tar}'s compilation dependent default.  .\par
\par
\pard{}{\f1{}--files-from={\i file}}\par
\pard{}{\f1{}-T {\i file}}\par
{\f1{}\pard\li720{}tar} will use the contents of {\i file} as a list of archive members or files to operate on, in addition to those specified on the command-line.  .\par
\par
\pard{}{\f1{}--force-local}\par
\pard\li720{}Forces {\f1{}tar} to interpret the filename given to {\f1{}--file} as a local file, even if it looks like a remote tape drive name.  .\par
\par
\pard{}{\f1{}--group={\i group}}\par
\pard\li720{}Files added to the {\f1{}tar} archive will have a group id of {\i group}, rather than the group from the source file.  {\i group} is first decoded as a group symbolic name, but if this interpretation fails, it has to be a decimal numeric group ID.  .\par
\par
\pard\li720{}Also see the comments for the {\f1{}--owner={\i user}} option.\par
\par
\pard{}{\f1{}--gunzip}\par
\pard\li720{}(See {\f1{}--gzip}; .)\par
\par
\pard{}{\f1{}--gzip}\par
\pard{}{\f1{}--gunzip}\par
\pard{}{\f1{}--ungzip}\par
\pard{}{\f1{}-z}\par
\pard\li720{}This option tells {\f1{}tar} to read or write archives through {\f1{}gzip}, allowing {\f1{}tar} to directly operate on several kinds of compressed archives transparently.  .\par
\par
\pard{}{\f1{}--help}\par
{\f1{}\pard\li720{}tar} will print out a short message summarizing the operations and options to {\f1{}tar} and exit.  .\par
\par
\pard{}{\f1{}--ignore-failed-read}\par
\pard\li720{}Instructs {\f1{}tar} to exit successfully if it encounters an unreadable file.  See {\uldb Reading}{\v Reading}.\par
\par
\pard{}{\f1{}--ignore-umask}\par
\pard\li720{}(See {\f1{}--preserve-permissions}; see {\uldb Writing}{\v Writing}.)\par
\par
\pard{}{\f1{}--ignore-zeros}\par
\pard{}{\f1{}-i}\par
\pard\li720{}With this option, {\f1{}tar} will ignore zeroed blocks in the archive, which normally signals EOF.  See {\uldb Reading}{\v Reading}.\par
\par
\pard{}{\f1{}--incremental}\par
\pard{}{\f1{}-G}\par
\pard\li720{}Used to inform {\f1{}tar} that it is working with an  old GNU-format incremental backup archive.  It is intended primarily for backwards compatibility only.  .\par
\par
\pard{}{\f1{}--info-script={\i script-file}}\par
\pard{}{\f1{}--new-volume-script={\i script-file}}\par
\pard{}{\f1{}-F {\i script-file}}\par
\pard\li720{}When {\f1{}tar} is performing multi-tape backups, {\i script-file} is run at the end of each tape.  .\par
\par
\pard{}{\f1{}--interactive}\par
\pard{}{\f1{}--confirmation}\par
\pard{}{\f1{}-w}\par
\pard\li720{}Specifies that {\f1{}tar} should ask the user for confirmation before performing potentially destructive options, such as overwriting files.  .\par
\par
\pard{}{\f1{}--keep-old-files}\par
\pard{}{\f1{}-k}\par
\pard\li720{}When extracting files from an archive, {\f1{}tar} will not overwrite existing files if this option is present.  See {\uldb Writing}{\v Writing}.\par
\par
\pard{}{\f1{}--label={\i name}}\par
\pard{}{\f1{}-V {\i name}}\par
\pard\li720{}When creating an archive, instructs {\f1{}tar} to write {\i name} as a name record in the archive.  When extracting or listing archives, {\f1{}tar} will only operate on archives that have a label matching the pattern specified in {\i name}.  .\par
\par
\pard{}{\f1{}--listed-incremental={\i snapshot-file}}\par
\pard{}{\f1{}-g {\i snapshot-file}}\par
\pard\li720{}During a {\f1{}--create} operation, specifies that the archive that {\f1{}tar} creates is a new GNU-format incremental backup, using {\i snapshot-file} to determine which files to backup.  With other operations, informs {\f1{}tar} that the archive is in incremental format.  .\par
\par
\pard{}{\f1{}--mode={\i permissions}}\par
\pard\li720{}When adding files to an archive, {\f1{}tar} will use {\i permissions} for the archive members, rather than the permissions from the files.  The program {\f1{}chmod} and this {\f1{}tar} option share the same syntax for what {\i permissions} might be.  See {\uldb Permissions}{\v File_permissions @filetutils.hlp}.  This reference also has useful information for those not being overly familiar with the Unix permission system.\par
\par
\pard\li720{}Of course, {\i permissions} might be plainly specified as an octal number.  However, by using generic symbolic modifications to mode bits, this allows more flexibility.  For example, the value {\f1{}a+rw} adds read and write permissions for everybody, while retaining executable bits on directories or on any other file already marked as executable.\par
\par
\pard{}{\f1{}--multi-volume}\par
\pard{}{\f1{}-M}\par
\pard\li720{}Informs {\f1{}tar} that it should create or otherwise operate on a multi-volume {\f1{}tar} archive.  .\par
\par
\pard{}{\f1{}--new-volume-script}\par
\pard\li720{}(see -info-script)\par
\par
\pard{}{\f1{}--newer={\i date}}\par
\pard{}{\f1{}--after-date={\i date}}\par
\pard{}{\f1{}-N}\par
\pard\li720{}When creating an archive, {\f1{}tar} will only add files that have changed since {\i date}.  .\par
\par
\pard{}{\f1{}--newer-mtime}\par
\pard\li720{}In conjunction with {\f1{}--newer}, {\f1{}tar} will only add files whose contents have changed (as opposed to just {\f1{}--newer}, which will also back up files for which any status information has changed).\par
\par
\pard{}{\f1{}--no-recursion}\par
\pard\li720{}With this option, {\f1{}tar} will not recurse into directories unless a directory is explicitly named as an argument to {\f1{}tar}.  .\par
\par
\pard{}{\f1{}--null}\par
\pard\li720{}When {\f1{}tar} is using the {\f1{}--files-from} option, this option instructs {\f1{}tar} to expect filenames terminated with {\f1{}NUL}, so {\f1{}tar} can correctly work with file names that contain newlines.  .\par
\par
\pard{}{\f1{}--numeric-owner}\par
\pard\li720{}This option will notify {\f1{}tar} that it should use numeric user and group IDs when creating a {\f1{}tar} file, rather than names.  .\par
\par
\pard{}{\f1{}--old-archive}\par
\pard\li720{}(See {\f1{}--portability}; .)\par
\par
\pard{}{\f1{}--one-file-system}\par
\pard{}{\f1{}-l}\par
\pard\li720{}Used when creating an archive.  Prevents {\f1{}tar} from recursing into directories that are on different file systems from the current directory.  .\par
\par
\pard{}{\f1{}--owner={\i user}}\par
\pard\li720{}Specifies that {\f1{}tar} should use {\i user} as the owner of members when creating archives, instead of the user associated with the source file.  {\i user} is first decoded as a user symbolic name, but if this interpretation fails, it has to be a decimal numeric user ID.  .\par
\par
\pard\li720{}There is no value indicating a missing number, and {\f1{}0} usually means {\f1{}root}.  Some people like to force {\f1{}0} as the value to offer in their distributions for the owner of files, because the {\f1{}root} user is anonymous anyway, so that might as well be the owner of anonymous archives.\par
\par
\pard{}{\f1{}--portability}\par
\pard{}{\f1{}--old-archive}\par
\pard{}{\f1{}-o}\par
\pard\li720{}Tells {\f1{}tar} to create an archive that is compatible with Unix V7 {\f1{}tar}.  .\par
\par
\pard{}{\f1{}--posix}\par
\pard\li720{}Instructs {\f1{}tar} to create a POSIX compliant {\f1{}tar} archive.  .\par
\par
\pard{}{\f1{}--preserve}\par
\pard\li720{}Synonymous with specifying both {\f1{}--preserve-permissions} and {\f1{}--same-order}.  .\par
\par
\pard{}{\f1{}--preserve-order}\par
\pard\li720{}(See {\f1{}--same-order}; see {\uldb Reading}{\v Reading}.)\par
\par
\pard{}{\f1{}--preserve-permissions}\par
\pard{}{\f1{}--same-permissions}\par
\pard{}{\f1{}-p}\par
\pard\li720{}When {\f1{}tar} is extracting an archive, it normally subtracts the users' umask from the permissions specified in the archive and uses that number as the permissions to create the destination file.  Specifying this option instructs {\f1{}tar} that it should use the permissions directly from the archive.  See {\uldb Writing}{\v Writing}.\par
\par
\pard{}{\f1{}--read-full-records}\par
\pard{}{\f1{}-B}\par
\pard\li720{}Specifies that {\f1{}tar} should reblock its input, for reading from pipes on systems with buggy implementations.  See {\uldb Reading}{\v Reading}.\par
\par
\pard{}{\f1{}--record-size={\i size}}\par
\pard\li720{}Instructs {\f1{}tar} to use {\i size} bytes per record when accessing the archive.  .\par
\par
\pard{}{\f1{}--recursive-unlink}\par
\pard\li720{}Similar to the {\f1{}--unlink-first} option, removing existing directory hierarchies before extracting directories of the same name from the archive.  See {\uldb Writing}{\v Writing}.\par
\par
\pard{}{\f1{}--remove-files}\par
\pard\li720{}Directs {\f1{}tar} to remove the source file from the file system after appending it to an archive.  .\par
\par
\pard{}{\f1{}--rsh-command={\i cmd}}\par
\pard\li720{}Notifies {\f1{}tar} that is should use {\i cmd} to communicate with remote devices.  .\par
\par
\pard{}{\f1{}--same-order}\par
\pard{}{\f1{}--preserve-order}\par
\pard{}{\f1{}-s}\par
\pard\li720{}This option is an optimization for {\f1{}tar} when running on machines with small amounts of memory.  It informs {\f1{}tar} that the list of file arguments has already been sorted to match the order of files in the archive.  See {\uldb Reading}{\v Reading}.\par
\par
\pard{}{\f1{}--same-owner}\par
\pard\li720{}When extracting an archive, {\f1{}tar} will attempt to preserve the owner specified in the {\f1{}tar} archive with this option present.  .\par
\par
\pard{}{\f1{}--same-permissions}\par
\pard\li720{}(See {\f1{}--preserve-permissions}; see {\uldb Writing}{\v Writing}.)\par
\par
\pard{}{\f1{}--show-omitted-dirs}\par
\pard\li720{}Instructs {\f1{}tar} to mention directories its skipping over when operating on a {\f1{}tar} archive.  .\par
\par
\pard{}{\f1{}--sparse}\par
\pard{}{\f1{}-S}\par
\pard\li720{}Invokes a GNU extension when adding files to an archive that handles sparse files efficiently.  .\par
\par
\pard{}{\f1{}--starting-file={\i name}}\par
\pard{}{\f1{}-K {\i name}}\par
\pard\li720{}This option affects extraction only; {\f1{}tar} will skip extracting files in the archive until it finds one that matches {\i name}.  See {\uldb Scarce}{\v Scarce}.\par
\par
\pard{}{\f1{}--suffix={\i suffix}}\par
\pard\li720{}Alters the suffix {\f1{}tar} uses when backing up files from the default {\f1{}~}.  .\par
\par
\pard{}{\f1{}--tape-length={\i num}}\par
\pard{}{\f1{}-L {\i num}}\par
\pard\li720{}Specifies the length of tapes that {\f1{}tar} is writing as being {\i num} x 1024 bytes long.  .\par
\par
\pard{}{\f1{}--to-stdout}\par
\pard{}{\f1{}-O}\par
\pard\li720{}During extraction, {\f1{}tar} will extract files to stdout rather than to the file system.  See {\uldb Writing}{\v Writing}.\par
\par
\pard{}{\f1{}--totals}\par
\pard\li720{}Displays the total number of bytes written after creating an archive.  .\par
\par
\pard{}{\f1{}--touch}\par
\pard{}{\f1{}-m}\par
\pard\li720{}Sets the modification time of extracted files to the extraction time, rather than the modification time stored in the archive.  See {\uldb Writing}{\v Writing}.\par
\par
\pard{}{\f1{}--uncompress}\par
\pard\li720{}(See {\f1{}--compress}; .)\par
\par
\pard{}{\f1{}--ungzip}\par
\pard\li720{}(See {\f1{}--gzip}; .)\par
\par
\pard{}{\f1{}--unlink-first}\par
\pard{}{\f1{}-U}\par
\pard\li720{}Directs {\f1{}tar} to remove the corresponding file from the file system before extracting it from the archive.  See {\uldb Writing}{\v Writing}.\par
\par
\pard{}{\f1{}--use-compress-program={\i prog}}\par
\pard\li720{}Instructs {\f1{}tar} to access the archive through {\i prog}, which is presumed to be a compression program of some sort.  .\par
\par
\pard{}{\f1{}--verbose}\par
\pard{}{\f1{}-v}\par
\pard\li720{}Specifies that {\f1{}tar} should be more verbose about the operations its performing.  This option can be specified multiple times for some operations to increase the amount of information displayed.  .\par
\par
\pard{}{\f1{}--verify}\par
\pard{}{\f1{}-W}\par
\pard\li720{}Verifies that the archive was correctly written when creating an archive.  .\par
\par
\pard{}{\f1{}--version}\par
{\f1{}\pard\li720{}tar} will print an informational message about what version it is and a copyright message, some credits, and then exit.  .\par
\par
\pard{}{\f1{}--volno-file={\i file}}\par
\pard\li720{}Used in conjunction with {\f1{}--multi-volume}.  {\f1{}tar} will keep track of which volume of a multi-volume archive its working in {\i file}.  .\par
\pard{}}\par
\page\pard Node: {\b Short Option Summary}, \keepn Next: {\uldb }{\v }, Prev: {\uldb Option Summary}{\v Option_Summary}, Up: {\uldb All Options}{\v All_Options}\line
K{\footnote K Short Option Summary}
#{\footnote Short_Option_Summary}
${\footnote \pard{}Short Options Cross Reference}\par
\pard{\fs24\b Short Options Cross Reference}\par
\par
\pard{}Here is an alphabetized list of all of the short option forms, matching them with the equivalent long option.\par
\par
{\pard{}{\f1{}-A}\par
{\f1{}\pard\li720{}--concatenate}\par
\par
\pard{}{\f1{}-B}\par
{\f1{}\pard\li720{}--read-full-records}\par
\par
\pard{}{\f1{}-C}\par
{\f1{}\pard\li720{}--directory}\par
\par
\pard{}{\f1{}-F}\par
{\f1{}\pard\li720{}--info-script}\par
\par
\pard{}{\f1{}-G}\par
{\f1{}\pard\li720{}--incremental}\par
\par
\pard{}{\f1{}-K}\par
{\f1{}\pard\li720{}--starting-file}\par
\par
\pard{}{\f1{}-L}\par
{\f1{}\pard\li720{}--tape-length}\par
\par
\pard{}{\f1{}-M}\par
{\f1{}\pard\li720{}--multi-volume}\par
\par
\pard{}{\f1{}-N}\par
{\f1{}\pard\li720{}--newer}\par
\par
\pard{}{\f1{}-O}\par
{\f1{}\pard\li720{}--to-stdout}\par
\par
\pard{}{\f1{}-P}\par
{\f1{}\pard\li720{}--absolute-names}\par
\par
\pard{}{\f1{}-R}\par
{\f1{}\pard\li720{}--block-number}\par
\par
\pard{}{\f1{}-S}\par
{\f1{}\pard\li720{}--sparse}\par
\par
\pard{}{\f1{}-T}\par
{\f1{}\pard\li720{}--files-from}\par
\par
\pard{}{\f1{}-U}\par
{\f1{}\pard\li720{}--unlink-first}\par
\par
\pard{}{\f1{}-V}\par
{\f1{}\pard\li720{}--label}\par
\par
\pard{}{\f1{}-W}\par
{\f1{}\pard\li720{}--verify}\par
\par
\pard{}{\f1{}-X}\par
{\f1{}\pard\li720{}--exclude-from}\par
\par
\pard{}{\f1{}-Z}\par
{\f1{}\pard\li720{}--compress}\par
\par
\pard{}{\f1{}-b}\par
{\f1{}\pard\li720{}--blocking-factor}\par
\par
\pard{}{\f1{}-c}\par
{\f1{}\pard\li720{}--create}\par
\par
\pard{}{\f1{}-d}\par
{\f1{}\pard\li720{}--compare}\par
\par
\pard{}{\f1{}-f}\par
{\f1{}\pard\li720{}--file}\par
\par
\pard{}{\f1{}-g}\par
{\f1{}\pard\li720{}--listed-incremental}\par
\par
\pard{}{\f1{}-h}\par
{\f1{}\pard\li720{}--dereference}\par
\par
\pard{}{\f1{}-i}\par
{\f1{}\pard\li720{}--ignore-zeros}\par
\par
\pard{}{\f1{}-k}\par
{\f1{}\pard\li720{}--keep-old-files}\par
\par
\pard{}{\f1{}-l}\par
{\f1{}\pard\li720{}--one-file-system}\par
\par
\pard{}{\f1{}-m}\par
{\f1{}\pard\li720{}--touch}\par
\par
\pard{}{\f1{}-o}\par
{\f1{}\pard\li720{}--portability}\par
\par
\pard{}{\f1{}-p}\par
{\f1{}\pard\li720{}--preserve-permissions}\par
\par
\pard{}{\f1{}-r}\par
{\f1{}\pard\li720{}--append}\par
\par
\pard{}{\f1{}-s}\par
{\f1{}\pard\li720{}--same-order}\par
\par
\pard{}{\f1{}-t}\par
{\f1{}\pard\li720{}--list}\par
\par
\pard{}{\f1{}-u}\par
{\f1{}\pard\li720{}--update}\par
\par
\pard{}{\f1{}-v}\par
{\f1{}\pard\li720{}--verbose}\par
\par
\pard{}{\f1{}-w}\par
{\f1{}\pard\li720{}--interactive}\par
\par
\pard{}{\f1{}-x}\par
{\f1{}\pard\li720{}--extract}\par
\par
\pard{}{\f1{}-z}\par
{\f1{}\pard\li720{}--gzip}\par
\par
\pard{}}\par
\page\pard Node: {\b help}, \keepn Next: {\uldb verbose}{\v verbose}, Prev: {\uldb All Options}{\v All_Options}, Up: {\uldb tar invocation}{\v tar_invocation}\line
K{\footnote K help}
#{\footnote help}
${\footnote \pard{}GNU {\f1{}tar} documentation}\par
\pard{\fs24\b GNU {\f1{}tar} documentation}\par
\par
\pard{}Being careful, the first thing is really checking that you are using GNU {\f1{}tar}, indeed.  The {\f1{}--version} option will generate a message giving confirmation that you are using GNU {\f1{}tar}, with the precise version of GNU {\f1{}tar} you are using.  {\f1{}tar} identifies itself and prints the version number to the standard output, then immediately exits successfully, without doing anything else, ignoring all other options.  For example, {\f1{}tar --version} might return:\par
\par
{\pard\keep\li720\f1{}tar (GNU tar) 1.12\par
\pard\f0{}}\par
\pard{}The first occurrence of {\f1{}tar} in the result above is the program name in the package (for example, {\f1{}rmt} is another program), while the second occurrence of {\f1{}tar} is the name of the package itself, containing possibly many programs.  The package is currently named {\f1{}tar}, after the name of the main program it contains({\ul 1}{\v help_1}).\par
\par
\pard{}Another thing you might want to do is checking the spelling or meaning of some particular {\f1{}tar} option, without resorting to this manual, for once you have carefully read it.  GNU {\f1{}tar} has a short help feature, triggerable through the {\f1{}--help} option.  By using this option, {\f1{}tar} will print a usage message listing all available options on standard output, then exit successfully, without doing anything else and ignoring all other options.  Even if this is only a brief summary, it may be several screens long.  So, if you are not using some kind of scrollable window, you might prefer to use something like:\par
\par
{\pard\keep\li720\f1{}$ tar --help | less\par
\pard\f0{}}\par
\pard{}presuming, here, that you like using {\f1{}less} for a pager.  Other popular pagers are {\f1{}more} and {\f1{}pg}.  If you know about some {\i keyword} which interests you and do not want to read all the {\f1{}--help} output, another common idiom is doing:\par
\par
{\pard\keep\li720\f1{}tar --help | grep {\i keyword}\par
\pard\f0{}}\par
\pard{}for getting only the pertinent lines.\par
\par
\pard{}The perceptive reader would have noticed some contradiction in the previous paragraphs.  It is written that both {\f1{}--version} and {\f1{}--help} print something, and have all other options ignored.  In fact, they cannot ignore each other, and one of them has to win.  We do not specify which is stronger, here; experiment if you really wonder!\par
\par
\pard{}The short help output is quite succint, and you might have to get back to the full documentation for precise points.  If you are reading this paragraph, you already have the {\f1{}tar} manual in some form.  This manual is available in printed form, as a kind of small book.  It may printed out of the GNU {\f1{}tar} distribution, provided you have TeX already installed somewhere, and a laser printer around.  Just configure the distribution, execute the command {\f1{}make dvi}, then print {\f1{}doc/tar.dvi} the usual way (contact your local guru to know how).  If GNU {\f1{}tar} has been conveniently installed at your place, this manual is also available in interactive, hypertextual form as an Info file.  Just call {\f1{}info tar} or, if you do not have the {\f1{}info} program handy, use the Info reader provided within GNU Emacs, calling {\f1{}tar} from the main Info menu.\par
\par
\pard{}There is currently no {\f1{}man} page for GNU {\f1{}tar}.  If you observe such a {\f1{}man} page on the system you are running, either it does not long to GNU {\f1{}tar}, or it has not been produced by GNU.  Currently, GNU {\f1{}tar} documentation is provided in Texinfo format only, if we except, of course, the short result of {\f1{}tar --help}.\par
\par
\page\pard#{\footnote help_1}
\pard{}(1) There are plans to merge the {\f1{}cpio} and {\f1{}tar} packages into a single one which would be called {\f1{}paxutils}.  So, who knows if, one of this days, the {\f1{}--version} would not yield {\f1{}tar (GNU paxutils) 3.2}\par
\par
\page\pard Node: {\b verbose}, \keepn Next: {\uldb interactive}{\v interactive}, Prev: {\uldb help}{\v help}, Up: {\uldb tar invocation}{\v tar_invocation}\line
K{\footnote K verbose}
#{\footnote verbose}
${\footnote \pard{}Checking {\f1{}tar} progress}\par
\pard{\fs24\b Checking {\f1{}tar} progress}\par
\par
\pard{}{K{\footnote K Progress information}}{K{\footnote K Status information}}{K{\footnote K Information on progress and status of operations}}{K{\footnote K Verbose operation}}{K{\footnote K Block number where error occured}}{K{\footnote K Error message, block number of}}{K{\footnote K Version of the {\f1{}tar} program}} {K{\footnote K Getting more information during the operation}}{K{\footnote K Information during operation}}{K{\footnote K Feedback from {\f1{}tar}}} Typically, {\f1{}tar} performs most operations without reporting any information to the user except error messages.  When using {\f1{}tar} with many options, particularly ones with complicated or difficult-to-predict behavior, it is possible to make serious mistakes.  {\f1{}tar} provides several options that make observing {\f1{}tar} easier.  These options cause {\f1{}tar} to print information as it progresses in its job, and you might want to use them just for being more careful about what is going on, or merely for entertaining yourself.  If you have encountered a problem when operating on an archive, however, you may need more information than just an error message in order to solve the problem.  The following options can be helpful diagnostic tools.\par
\par
\pard{}Normally, the {\f1{}--list} ({\f1{}-t}) command to list an archive prints just the file names (one per line) and the other commands are silent.  When used with most operations, the {\f1{}--verbose} ({\f1{}-v}) option causes {\f1{}tar} to print the name of each file or archive member as it is processed.  This and the other options which make {\f1{}tar} print status information can be useful in monitoring {\f1{}tar}.\par
\par
\pard{}With {\f1{}--create} ({\f1{}-c}) or {\f1{}--extract} ({\f1{}--get}, {\f1{}-x}), {\f1{}--verbose} ({\f1{}-v}) used once just prints the names of the files or members as they are processed.  Using it twice causes {\f1{}tar} to print a longer listing (reminiscent of {\f1{}ls -l}) for each member.  Since {\f1{}--list} ({\f1{}-t}) already prints the names of the members, {\f1{}--verbose} ({\f1{}-v}) used once with {\f1{}--list} ({\f1{}-t}) causes {\f1{}tar} to print an {\f1{}ls -l} type listing of the files in the archive.  The following examples both extract members with long list output:\par
\par
{\pard\keep\li720\f1{}$ tar --extract --file=archive.tar --verbose --verbose\line
$ tar xvv archive.tar\par
\pard\f0{}}\par
\pard{}Verbose output appears on the standard output except when an archive is being written to the standard output, as with {\f1{}tar --create --file=- --verbose} ({\f1{}tar cfv -}, or even {\f1{}tar cv}--if the installer let standard output be the default archive).  In that case {\f1{}tar} writes verbose output to the standard error stream.\par
\par
\pard{}The {\f1{}--totals} option--which is only meaningful when used with {\f1{}--create} ({\f1{}-c})--causes {\f1{}tar} to print the total amount written to the archive, after it has been fully created.\par
\par
\pard{}The {\f1{}--checkpoint} option prints an occasional message as {\f1{}tar} reads or writes the archive.  In fact, it print directory names while reading the archive.  It is designed for those who don't need the more detailed (and voluminous) output of {\f1{}--block-number} ({\f1{}-R}), but do want visual confirmation that {\f1{}tar} is actually making forward progress.\par
\par
\pard{}The {\f1{}--show-omitted-dirs} option, when reading an archive--with {\f1{}--list} ({\f1{}-t}) or {\f1{}--extract} ({\f1{}--get}, {\f1{}-x}), for example--causes a message to be printed for each directory in the archive which is skipped.  This happens regardless of the reason for skipping: the directory might not have been named on the command line (implicitly or explicitly), it might be excluded by the use of the {\f1{}--exclude={\i pattern}} option, or some other reason.\par
\par
\pard{}If {\f1{}--block-number} ({\f1{}-R}) is used, {\f1{}tar} prints, along with every message it would normally produce, the block number within the archive where the message was triggered.  Also, supplementary messages are triggered when reading blocks full of NULs, or when hitting end of file on the archive.  As of now, if the archive if properly terminated with a NUL block, the reading of the file may stop before end of file is met, so the position of end of file will not usually show when {\f1{}--block-number} ({\f1{}-R}) is used.  Note that GNU {\f1{}tar} drains the archive before exiting when reading the archive from a pipe.\par
\par
\pard{}This option is especially useful when reading damaged archives, since it helps pinpoint the damaged sections.  It can also be used with {\f1{}--list} ({\f1{}-t}) when listing a file-system backup tape, allowing you to choose among several backup tapes when retrieving a file later, in favor of the tape where the file appears earliest (closest to the front of the tape).  .\par
\par
\page\pard Node: {\b interactive}, \keepn Next: {\uldb }{\v }, Prev: {\uldb verbose}{\v verbose}, Up: {\uldb tar invocation}{\v tar_invocation}\line
K{\footnote K interactive}
#{\footnote interactive}
${\footnote \pard{}Asking for Confirmation During Operations}\par
\pard{\fs24\b Asking for Confirmation During Operations}\par
\par
\pard{}{K{\footnote K Interactive operation}} Typically, {\f1{}tar} carries out a command without stopping for further instructions.  In some situations however, you may want to exclude some files and archive members from the operation (for instance if disk or storage space is tight).  You can do this by excluding certain files automatically (see {\uldb Choosing}{\v Choosing}), or by performing an operation interactively, using the {\f1{}--interactive} ({\f1{}-w}) option.  {\f1{}tar} also accepts {\f1{}--confirmation} for this option.\par
\par
\pard{}When the {\f1{}--interactive} ({\f1{}-w}) option is specified, before reading, writing, or deleting files, {\f1{}tar} first prints a message for each such file, telling what operation it intends to take, then asks for confirmation on the terminal.  The actions which require confirmation include adding a file to the archive, extracting a file from the archive, deleting a file from the archive, and deleting a file from disk.  To confirm the action, you must type a line of input beginning with {\f1{}y}.  If your input line begins with anything other than {\f1{}y}, {\f1{}tar} skips that file.\par
\par
\pard{}If {\f1{}tar} is reading the archive from the standard input, {\f1{}tar} opens the file {\f1{}/dev/tty} to support the interactive communications.\par
\par
\pard{}Verbose output is normally sent to standard output, separate from other error messages.  However, if the archive is produced directly on standard output, then verbose output is mixed with errors on {\f1{}stderr}.  Producing the archive on standard output may be used as a way to avoid using disk space, when the archive is soon to be consumed by another process reading it, say.  Some people felt the need of producing an archive on stdout, still willing to segregate between verbose output and error output.  A possible approach would be using a named pipe to receive the archive, and having the consumer process to read from that named pipe.  This has the advantage of letting standard output free to receive verbose output, all separate from errors.\par
\par
\page\pard Node: {\b operations}, \keepn Next: {\uldb Backups}{\v Backups}, Prev: {\uldb tar invocation}{\v tar_invocation}, Up: {\uldb Top}{\v Top}\line
K{\footnote K operations}
#{\footnote operations}
${\footnote \pard{}GNU {\f1{}tar} Operations}\par
\pard{\fs24\b GNU {\f1{}tar} Operations}\par
\par
{\par
\pard\keep\fi-2880\li2880\tx2880{}{\uldb Basic tar}{\v Basic_tar}\tab \par
{\uldb Advanced tar}{\v Advanced_tar}\tab \par
{\uldb extract options}{\v extract_options}\tab \par
{\uldb backup}{\v backup}\tab \par
{\uldb Applications}{\v Applications}\tab \par
{\uldb looking ahead}{\v looking_ahead}\tab\par
\pard{}}\par
\page\pard Node: {\b Basic tar}, \keepn Next: {\uldb Advanced tar}{\v Advanced_tar}, Prev: {\uldb operations}{\v operations}, Up: {\uldb operations}{\v operations}\line
K{\footnote K Basic tar}
#{\footnote Basic_tar}
${\footnote \pard{}Basic GNU {\f1{}tar} Operations}\par
\pard{\fs24\b Basic GNU {\f1{}tar} Operations}\par
\par
\pard{}The basic {\f1{}tar} operations, {\f1{}--create} ({\f1{}-c}), {\f1{}--list} ({\f1{}-t}) and {\f1{}--extract} ({\f1{}--get}, {\f1{}-x}), are currently presented and described in the tutorial chapter of this manual.  This section provides some complementary notes for these operations.\par
\par
{\pard{}{\f1{}--create} ({\f1{}-c})\par
\pard\li720{}Creating an empty archive would have some kind of elegance.  One can initialize an empty archive and later use {\f1{}--append} ({\f1{}-r}) for adding all members.  Some applications would not welcome making an exception in the way of adding the first archive member.  On the other hand, many people reported that it is dangerously too easy for {\f1{}tar} to destroy a magnetic tape with an empty archive({\ul 1}{\v Basic_tar_1}).  The two most common errors are:\par
\par
{\pard\fi-720\li1440\tx864\tx1440{}\tab{}1. \tab{}Mistakingly using {\f1{}create} instead of {\f1{}extract}, when the intent was to extract the full contents of an archive.  This error is likely: keys {\f1{}c} and {\f1{}x} are right next ot each other on the QWERTY keyboard.  Instead of being unpacked, the archive then gets wholly destroyed.  When users speak about \'A2exploding\'A2 an archive, they usually mean something else :-).\par
\par
\pard\fi-720\li1440\tx864\tx1440{}\tab{}2. \tab{}Forgetting the argument to {\f1{}file}, when the intent was to create an archive with a single file in it.  This error is likely because a tired user can easily add the {\f1{}f} key to the cluster of option letters, by the mere force of habit, without realizing the full consequence of doing so.  The usual consequence is that the single file, which was meant to be saved, is rather destroyed.\par
\pard\li720{}}\par
\pard\li720{}So, recognizing the likelihood and the catastrophical nature of these errors, GNU {\f1{}tar} now takes some distance from elegance, and cowardly refuses to create an archive when {\f1{}--create} ({\f1{}-c}) option is given, there are no arguments besides options, and {\f1{}--files-from={\i file-of-names}} ({\f1{}-T {\i file-of-names}}) option is {\i not} used.  To get around the cautiousness of GNU {\f1{}tar} and nevertheless create an archive with nothing in it, one may still use, as the value for the {\f1{}--files-from={\i file-of-names}} ({\f1{}-T {\i file-of-names}}) option, a file with no names in it, as shown in the following commands:\par
\par
{\pard\keep\li1440\f1{}tar --create --file=empty-archive.tar --files-from=/dev/null\line
tar cfT empty-archive.tar /dev/null\par
\pard\li720\f0{}}\par
\pard{}{\f1{}--extract} ({\f1{}--get}, {\f1{}-x})\par
\pard\li720{}A socket is stored, within a GNU {\f1{}tar} archive, as a pipe.\par
\par
\pard{}{\f1{}--list} ({\f1{}-t})\par
\pard\li720{}GNU {\f1{}tar} now shows dates as {\f1{}1996-11-09}, while it used to show them as {\f1{}Nov 11 1996}.  (One can revert to the old behavior by defining {\f1{}USE_OLD_CTIME} in {\f1{}src/list.c} before reinstalling.)  But preferrably, people you should get used to ISO 8601 dates.  Local American dates should be made available again with full date localisation support, once ready.  In the meantime, programs not being localisable for dates should prefer international dates, that's really the way to go.\par
\par
\pard\li720{}Look up <URL:http://www.ft.uni-erlangen.de/~mskuhn/iso-time.html> if you are curious, it contains a detailed explanation of the ISO 8601 standard.\par
\par
\pard{}}\par
\page\pard#{\footnote Basic_tar_1}
\pard{}(1) This is well described in {\i Unix-haters Handbook}, by Simson Garfinkel, Daniel Weise & Steven Strassmann, IDG Books, ISBN 1-56884-203-1.\par
\par
\page\pard Node: {\b Advanced tar}, \keepn Next: {\uldb extract options}{\v extract_options}, Prev: {\uldb Basic tar}{\v Basic_tar}, Up: {\uldb operations}{\v operations}\line
K{\footnote K Advanced tar}
#{\footnote Advanced_tar}
${\footnote \pard{}Advanced GNU {\f1{}tar} Operations}\par
\pard{\fs24\b Advanced GNU {\f1{}tar} Operations}\par
\par
\pard{}Now that you have learned the basics of using GNU {\f1{}tar}, you may want to learn about further ways in which {\f1{}tar} can help you.\par
\par
\pard{}This chapter presents five, more advanced operations which you probably won't use on a daily basis, but which serve more specialized functions.  We also explain the different styles of options and why you might want to use one or another, or a combination of them in your {\f1{}tar} commands.  Additionally, this chapter includes options which allow you to define the output from {\f1{}tar} more carefully, and provide help and error correction in special circumstances.\par
\par
{\par
\pard\keep\fi-2880\li2880\tx2880{}{\uldb Operations}{\v Operations}\tab \par
{\uldb current state}{\v current_state}\tab \par
{\uldb append}{\v append}\tab \par
{\uldb update}{\v update}\tab \par
{\uldb concatenate}{\v concatenate}\tab \par
{\uldb delete}{\v delete}\tab \par
{\uldb compare}{\v compare}\tab\par
\pard{}}\par
\page\pard Node: {\b Operations}, \keepn Next: {\uldb current state}{\v current_state}, Prev: {\uldb Advanced tar}{\v Advanced_tar}, Up: {\uldb Advanced tar}{\v Advanced_tar}\line
K{\footnote K Operations}
#{\footnote Operations}
${\footnote \pard{}The Five Advanced {\f1{}tar} Operations}\par
\pard{\fs24\b The Five Advanced {\f1{}tar} Operations}\par
\par
{{{\i \pard\li720{}(This message will disappear, once this node revised.)}\par
\pard{}}}\par
\pard{}In the last chapter, you learned about the first three operations to {\f1{}tar}.  This chapter presents the remaining five operations to {\f1{}tar}: {\f1{}--append}, {\f1{}--update}, {\f1{}--concatenate}, {\f1{}--delete}, and {\f1{}--compare}.\par
\par
\pard{}You are not likely to use these operations as frequently as those covered in the last chapter; however, since they perform specialized functions, they are quite useful when you do need to use them.  We will give examples using the same directory and files that you created in the last chapter.  As you may recall, the directory is called {\f1{}practice}, the files are {\f1{}jazz}, {\f1{}blues}, {\f1{}folk}, {\f1{}rock}, and the two archive files you created are {\f1{}collection.tar} and {\f1{}music.tar}.\par
\par
\pard{}We will also use the archive files {\f1{}afiles.tar} and {\f1{}bfiles.tar}.  {\f1{}afiles.tar} contains the members {\f1{}apple}, {\f1{}angst}, and {\f1{}aspic}.  {\f1{}bfiles.tar} contains the members {\f1{}./birds}, {\f1{}baboon}, and {\f1{}./box}.\par
\par
\pard{}Unless we state otherwise, all practicing you do and examples you follow in this chapter will take place in the {\f1{}practice} directory that you created in the previous chapter; see {\uldb prepare for examples}{\v prepare_for_examples}.  (Below in this section, we will remind you of the state of the examples where the last chapter left them.)\par
\par
\pard{}The five operations that we will cover in this chapter are:\par
\par
{\pard{}{\f1{}--append}\par
\pard{}{\f1{}-r}\par
\pard\li720{}Add new entries to an archive that already exists.\par
\par
\pard{}{\f1{}--update}\par
\pard{}{\f1{}-r}\par
\pard\li720{}Add more recent copies of archive members to the end of an archive, if they exist.\par
\par
\pard{}{\f1{}--concatenate}\par
\pard{}{\f1{}--catenate}\par
\pard{}{\f1{}-A}\par
\pard\li720{}Add one or more pre-existing archives to the end of another archive.\par
\par
\pard{}{\f1{}--delete}\par
\pard\li720{}Delete items from an archive (does not work on tapes).\par
\par
\pard{}{\f1{}--compare}\par
\pard{}{\f1{}--diff}\par
\pard{}{\f1{}-d}\par
\pard\li720{}Compare archive members to their counterparts in the file system.\par
\pard{}}\par
\page\pard Node: {\b current state}, \keepn Next: {\uldb append}{\v append}, Prev: {\uldb Operations}{\v Operations}, Up: {\uldb Advanced tar}{\v Advanced_tar}\line
K{\footnote K current state}
#{\footnote current_state}
{${\footnote \pard{}The Current State of the Practice Files}\par
\pard{\fs24\b The Current State of the Practice Files}\par
\par
}\pard{}Currently, the listing of the directory using {\f1{}ls} is as follows:\par
\par
{\line
\pard{}}\par
\pard{}The archive file {\f1{}collection.tar} looks like this:\par
\par
{\pard\keep\li720\f1{}$ tar -tvf collection.tar\line
\par
\pard\f0{}}\par
\pard{}The archive file {\f1{}music.tar} looks like this:\par
\par
{\pard\keep\li720\f1{}$ tar -tvf music.tar\line
\par
\pard\f0{}}\par
\page\pard Node: {\b append}, \keepn Next: {\uldb update}{\v update}, Prev: {\uldb current state}{\v current_state}, Up: {\uldb Advanced tar}{\v Advanced_tar}\line
K{\footnote K append}
#{\footnote append}
${\footnote \pard{}How to Add Files to Existing Archives: {\f1{}--append}}\par
\pard{\fs24\b How to Add Files to Existing Archives: {\f1{}--append}}\par
\par
{{{\i \pard\li720{}(This message will disappear, once this node revised.)}\par
\pard{}}}\par
\pard{}If you want to add files to an existing archive, you don't need to create a new archive; you can use {\f1{}--append} ({\f1{}-r}).  The archive must already exist in order to use {\f1{}--append}.  (A related operation is the {\f1{}--update} operation; you can use this to add newer versions of archive members to an existing archive.  To learn how to do this with {\f1{}--update}, see {\uldb update}{\v update}.)\par
\par
\pard{}If you use {\f1{}--append} ({\f1{}-r}) to add a file that has the same name as an archive member to an archive containing that archive member, then the old member is not deleted.  What does happen, however, is somewhat complex.  {\f1{}tar} {\i allows} you to have infinite numbers of files with the same name.  Some operations treat these same-named members no differently than any other set of archive members: for example, if you view an archive with {\f1{}--list} ({\f1{}-t}), you will see all of those members listed, with their modification times, owners, etc.\par
\par
\pard{}Other operations don't deal with these members as perfectly as you might prefer; if you were to use {\f1{}--extract} ({\f1{}--get}, {\f1{}-x}) to extract the archive, only the most recently added copy of a member with the same name as four other members would end up in the working directory.  This is because {\f1{}--extract} extracts an archive in the order the members appeared in the archive; the most recently archived members will be extracted last.  Additionally, an extracted member will {\i overwrite} a file of the same name which existed in the directory already, and {\f1{}tar} will not prompt you about this.  Thus, only the most recently archived member will end up being extracted, as it will overwrite the one extracted before it, and so on.\par
\par
\pard{}There are a few ways to get around this.  .\par
\par
\pard{}{K{\footnote K Members, replacing with other members}}{K{\footnote K Replacing members with other members}}If you want to replace an archive member, use {\f1{}--delete} to delete the member you want to remove from the archive, , and then use {\f1{}--append} to add the member you want to be in the archive.  Note that you can not change the order of the archive; the most recently added member will still appear last.  In this sense, you cannot truely "replace" one member with another.  (Replacing one member with another will not work on certain types of media, such as tapes; see {\uldb delete}{\v delete} and {\uldb Media}{\v Media}, for more information.)\par
\par
{\par
\pard\keep\fi-2880\li2880\tx2880{}{\uldb appending files}{\v appending_files}\tab Appending Files to an Archive\par
{\uldb multiple}{\v multiple}\tab\par
\pard{}}\par
\page\pard Node: {\b appending files}, \keepn Next: {\uldb multiple}{\v multiple}, Prev: {\uldb append}{\v append}, Up: {\uldb append}{\v append}\line
K{\footnote K appending files}
#{\footnote appending_files}
${\footnote \pard{}Appending Files to an Archive}\par
\pard{\fs24\b Appending Files to an Archive}\par
\par
{{{\i \pard\li720{}(This message will disappear, once this node revised.)}\par
\pard{}}}\par
\pard{}{K{\footnote K Adding files to an Archive}}{K{\footnote K Appending files to an Archive}}{K{\footnote K Archives, Appending files to}} The simplest way to add a file to an already existing archive is the {\f1{}--append} ({\f1{}-r}) operation, which writes specified files into the archive whether or not they are already among the archived files.  When you use {\f1{}--append}, you {\i must} specify file name arguments, as there is no default.  If you specify a file that already exists in the archive, another copy of the file will be added to the end of the archive.  As with other operations, the member names of the newly added files will be exactly the same as their names given on the command line.  The {\f1{}--verbose} ({\f1{}-v}) option will print out the names of the files as they are written into the archive.\par
\par
{\f1{}\pard{}--append} cannot be performed on some tape drives, unfortunately, due to deficiencies in the formats those tape drives use.  The archive must be a valid {\f1{}tar} archive, or else the results of using this operation will be unpredictable.  See {\uldb Media}{\v Media}.\par
\par
\pard{}To demonstrate using {\f1{}--append} to add a file to an archive, create a file called {\f1{}rock} in the {\f1{}practice} directory.  Make sure you are in the {\f1{}practice} directory.  Then, run the following {\f1{}tar} command to add {\f1{}rock} to {\f1{}collection.tar}:\par
\par
{\pard\keep\li720\f1{}$ tar --append --file=collection.tar rock\par
\pard\f0{}}\par
\pard{}If you now use the {\f1{}--list} ({\f1{}-t}) operation, you will see that {\f1{}rock} has been added to the archive:\par
\par
{\pard\keep\li720\f1{}$ tar --list --file=collection.tar\line
-rw-rw-rw- me user     28 1996-10-18 16:31 jazz\line
-rw-rw-rw- me user     21 1996-09-23 16:44 blues\line
-rw-rw-rw- me user     20 1996-09-23 16:44 folk\line
-rw-rw-rw- me user     20 1996-09-23 16:44 rock\par
\pard\f0{}}\par
\page\pard Node: {\b multiple}, \keepn Next: {\uldb }{\v }, Prev: {\uldb appending files}{\v appending_files}, Up: {\uldb append}{\v append}\line
K{\footnote K multiple}
#{\footnote multiple}
${\footnote \pard{}Multiple Files with the Same Name}\par
\pard{\fs24\b Multiple Files with the Same Name}\par
\par
\pard{}You can use {\f1{}--append} ({\f1{}-r}) to add copies of files which have been updated since the archive was created.  (However, we do not recommend doing this since there is another {\f1{}tar} option called {\f1{}--update}; see {\uldb update}{\v update} for more information.  We describe this use of {\f1{}--append} here for the sake of completeness.)   When you extract the archive, the older version will be effectively lost.  This works because files are extracted from an archive in the order in which they were archived.  Thus, when the archive is extracted, a file archived later in time will overwrite a file of the same name which was archived earlier, even though the older version of the file will remain in the archive unless you delete all versions of the file.\par
\par
\pard{}Supposing you change the file {\f1{}blues} and then append the changed version to {\f1{}collection.tar}.  As you saw above, the original {\f1{}blues} is in the archive {\f1{}collection.tar}.  If you change the file and append the new version of the file to the archive, there will be two copies in the archive.  When you extract the archive, the older version of the file will be extracted first, and then overwritten by the newer version when it is extracted.\par
\par
\pard{}You can append the new, changed copy of the file {\f1{}blues} to the archive in this way:\par
\par
{\pard\keep\li720\f1{}$ tar --append --verbose --file=collection.tar blues\line
blues\par
\pard\f0{}}\par
\pard{}Because you specified the {\f1{}--verbose} option, {\f1{}tar} has printed the name of the file being appended as it was acted on.  Now list the contents of the archive:\par
\par
{\pard\keep\li720\f1{}$ tar --list --verbose --file=collection.tar\line
-rw-rw-rw- me user     28 1996-10-18 16:31 jazz\line
-rw-rw-rw- me user     21 1996-09-23 16:44 blues\line
-rw-rw-rw- me user     20 1996-09-23 16:44 folk\line
-rw-rw-rw- me user     20 1996-09-23 16:44 rock\line
-rw-rw-rw- me user     58 1996-10-24 18:30 blues\par
\pard\f0{}}\par
\pard{}The newest version of {\f1{}blues} is now at the end of the archive (note the different creation dates and file sizes).  If you extract the archive, the older version of the file {\f1{}blues} will be overwritten by the newer version.  You can confirm this by extracting the archive and running {\f1{}ls} on the directory.  See {\uldb Writing}{\v Writing} for more information.  ({\i Please note:} This is the case unless you employ the {\f1{}--backup} option; .)\par
\par
\page\pard Node: {\b update}, \keepn Next: {\uldb concatenate}{\v concatenate}, Prev: {\uldb append}{\v append}, Up: {\uldb Advanced tar}{\v Advanced_tar}\line
K{\footnote K update}
#{\footnote update}
${\footnote \pard{}Updating an Archive}\par
\pard{\fs24\b Updating an Archive}\par
\par
{{{\i \pard\li720{}(This message will disappear, once this node revised.)}\par
\pard{}}}\par
\pard{}{K{\footnote K Updating an archive}} In the previous section, you learned how to use {\f1{}--append} ({\f1{}-r}) to add a file to an existing archive.  A related operation is {\f1{}--update} ({\f1{}-u}).  The {\f1{}--update} operation updates a {\f1{}tar} archive by comparing the date of the specified archive members against the date of the file with the same name.  If the file has been modified more recently than the archive member, then the newer version of the file is added to the archive (as with {\f1{}--append} ({\f1{}-r})).\par
\par
\pard{}Unfortunately, you cannot use {\f1{}--update} with magnetic tape drives.  The operation will fail.\par
\par
\pard{}Both {\f1{}--update} and {\f1{}--append} work by adding to the end of the archive.  When you extract a file from the archive, only the version stored last will wind up in the file system, unless you use the {\f1{}--backup} option ().\par
\par
{\par
\pard\keep\fi-2880\li2880\tx2880{}{\uldb how to update}{\v how_to_update}\tab\par
\pard{}}\par
\page\pard Node: {\b how to update}, \keepn Next: {\uldb }{\v }, Prev: {\uldb update}{\v update}, Up: {\uldb update}{\v update}\line
K{\footnote K how to update}
#{\footnote how_to_update}
${\footnote \pard{}How to Update an Archive Using {\f1{}--update}}\par
\pard{\fs24\b How to Update an Archive Using {\f1{}--update}}\par
\par
\pard{}You must use file name arguments with the {\f1{}--update} ({\f1{}-u}) operation.  If you don't specify any files, {\f1{}tar} won't act on any files and won't tell you that it didn't do anything (which may end up confusing you).\par
\par
\pard{}To see the {\f1{}--update} option at work, create a new file, {\f1{}classical}, in your practice directory, and some extra text to the file {\f1{}blues}, using any text editor.  Then invoke {\f1{}tar} with the {\f1{}update} operation and the {\f1{}--verbose} ({\f1{}-v}) option specified, using the names of all the files in the practice directory as file name arguments:\par
\par
{\pard\keep\li720\f1{}$ tar --update -v -f collection.tar blues folk rock classical\line
blues\line
classical\line
$\par
\pard\f0{}}\par
\pard{}Because we have specified verbose mode, {\f1{}tar} prints out the names of the files it is working on, which in this case are the names of the files that needed to be updated.  If you run {\f1{}tar --list} and look at the archive, you will see {\f1{}blues} and {\f1{}classical} at its end.  There will be a total of two versions of the member {\f1{}blues}; the one at the end will be newer and larger, since you added text before updating it.\par
\par
\pard{}(The reason {\f1{}tar} does not overwrite the older file when updating it is because writing to the middle of a section of tape is a difficult process.  Tapes are not designed to go backward.  See {\uldb Media}{\v Media} for more information about tapes.\par
\par
\pa\'7BNo Value For "rd\'7B\'7Dop-update"\'7D is not suitable for performing backups for two reasons: it does not change directory content entries, and it lengthens the archive every time it is used.  The GNU {\f1{}tar} options intended specifically for backups are more efficient.  If you need to run backups, please consult {\uldb Backups}{\v Backups}.\par
\par
\page\pard Node: {\b concatenate}, \keepn Next: {\uldb delete}{\v delete}, Prev: {\uldb update}{\v update}, Up: {\uldb Advanced tar}{\v Advanced_tar}\line
K{\footnote K concatenate}
#{\footnote concatenate}
${\footnote \pard{}Combining Archives with {\f1{}--concatenate}}\par
\pard{\fs24\b Combining Archives with {\f1{}--concatenate}}\par
\par
\pard{}{K{\footnote K Adding archives to an archive}}{K{\footnote K Concatenating Archives}}Sometimes it may be convenient to add a second archive onto the end of an archive rather than adding individual files to the archive.  To add one or more archives to the end of another archive, you should use the {\f1{}--concatenate} ({\f1{}--catenate}, {\f1{}-A}) operation.\par
\par
\pard{}To use {\f1{}--concatenate}, name the archives to be concatenated on the command line.  (Nothing happens if you don't list any.)  The members, and their member names, will be copied verbatim from those archives.  If this causes multiple members to have the same name, it does not delete any members; all the members with the same name coexist.  For information on how this affects reading the archive, .\par
\par
\pard{}To demonstrate how {\f1{}--concatenate} works, create two small archives called {\f1{}bluesrock.tar} and {\f1{}folkjazz.tar}, using the relevant files from {\f1{}practice}:\par
\par
{\pard\keep\li720\f1{}$ tar -cvf bluesrock.tar blues rock\line
blues\line
classical\line
$ tar -cvf folkjazz.tar folk jazz\line
folk\line
jazz\par
\pard\f0{}}\par
\pard{}If you like, You can run {\f1{}tar --list} to make sure the archives contain what they are supposed to:\par
\par
{\pard\keep\li720\f1{}$ tar -tvf bluesrock.tar\line
-rw-rw-rw- melissa user    105 1997-01-21 19:42 blues\line
-rw-rw-rw- melissa user     33 1997-01-20 15:34 rock\line
$ tar -tvf folkjazz.tar\line
-rw-rw-rw- melissa user     20 1996-09-23 16:44 folk\line
-rw-rw-rw- melissa user     65 1997-01-30 14:15 jazz\par
\pard\f0{}}\par
\pard{}We can concatenate these two archives with {\f1{}tar}:\par
\par
{\pard\keep\li720\f1{}$ cd ..\line
$ tar --concatenate --file=bluesrock.tar jazzfolk.tar\par
\pard\f0{}}\par
\pard{}If you now list the contents of the {\f1{}bluesclass.tar}, you will see that now it also contains the archive members of {\f1{}jazzfolk.tar}:\par
\par
{\pard\keep\li720\f1{}$ tar --list --file=bluesrock.tar\line
blues\line
rock\line
jazz\line
folk\par
\pard\f0{}}\par
\pard{}When you use {\f1{}--concatenate}, the source and target archives must already exist and must have been created using compatable format parameters ().  The new, concatenated archive will be called by the same name as the first archive listed on the command line.\par
\par
\pard{}Like {\f1{}--append} ({\f1{}-r}), this operation cannot be performed on some tape drives, due to deficiencies in the formats those tape drives use.\par
\par
\pard{}{K{\footnote K {\f1{}concatenate} vs {\f1{}cat}}}{K{\footnote K {\f1{}cat} vs {\f1{}concatenate}}}It may seem more intuitive to you to want or try to use {\f1{}cat} to concatenate two archives instead of using the {\f1{}--concatenate} operation; after all, {\f1{}cat} is the utility for combining files.\par
\par
\pard{}However, {\f1{}tar} archives incorporate an end-of-file marker which must be removed if the concatenated archives are to be read properly as one archive.  {\f1{}--concatenate} removes the end-of-archive marker from the target archive before each new archive is appended.  If you use {\f1{}cat} to combine the archives, the result will not be a valid {\f1{}tar} format archive.  If you need to retrieve files from an archive that was added to using the {\f1{}cat} utility, use the {\f1{}--ignore-zeros} ({\f1{}-i}) option.  See {\uldb Ignore Zeros}{\v Ignore_Zeros} for further information on dealing with archives improperly combined using the {\f1{}cat} shell utility.\par
\par
\pard{}You must specify the source archives using {\f1{}--file={\i archive-name}} ({\f1{}-f {\i archive-name}}) (see {\uldb file}{\v file}).  If you do not specify the target archive, {\f1{}tar} uses the value of the environment variable {\f1{}TAPE}, or, if this has not been set, the default archive name.\par
\par
\page\pard Node: {\b delete}, \keepn Next: {\uldb compare}{\v compare}, Prev: {\uldb concatenate}{\v concatenate}, Up: {\uldb Advanced tar}{\v Advanced_tar}\line
K{\footnote K delete}
#{\footnote delete}
${\footnote \pard{}Removing Archive Members Using {\f1{}--delete}}\par
\pard{\fs24\b Removing Archive Members Using {\f1{}--delete}}\par
\par
{{{\i \pard\li720{}(This message will disappear, once this node revised.)}\par
\pard{}}}\par
\pard{}{K{\footnote K Deleting files from an archive}}{K{\footnote K Removing files from an archive}} You can remove members from an archive by using the {\f1{}--delete} option.  Specify the name of the archive with {\f1{}--file={\i archive-name}} ({\f1{}-f {\i archive-name}}) and then specify the names of the members to be deleted; if you list no member names, nothing will be deleted.  The {\f1{}--verbose} ({\f1{}-v}) option will cause {\f1{}tar} to print the names of the members as they are deleted.  As with {\f1{}--extract} ({\f1{}--get}, {\f1{}-x}), you must give the exact member names when using {\f1{}tar --delete}.  {\f1{}--delete} will remove all versions of the named file from the archive.  The {\f1{}--delete} operation can run very slowly.\par
\par
\pard{}Unlike other operations, {\f1{}--delete} has no short form.\par
\par
\pard{}{K{\footnote K Tapes, using {\f1{}--delete} and}}{K{\footnote K Deleting from tape archives}}This operation will rewrite the archive.  You can only use {\f1{}--delete} on an archive if the archive device allows you to write to any point on the media, such as a disk; because of this, it does not work on magnetic tapes.  Do not try to delete an archive member from a magnetic tape; the action will not succeed, and you will be likely to scramble the archive and damage your tape.  There is no safe way (except by completely re-writing the archive) to delete files from most kinds of magnetic tape.  See {\uldb Media}{\v Media}.\par
\par
\pard{}To delete all versions of the file {\f1{}blues} from the archive {\f1{}collection.tar} in the {\f1{}practice} directory, make sure you are in that directory, and then,\par
\par
{\pard\keep\li720\f1{}$ tar --list --file=collection.tar\line
blues\line
folk\line
jazz\line
rock\line
practice/blues\line
practice/folk\line
practice/jazz\line
practice/rock\line
practice/blues\line
$ tar --delete --file=collection.tar blues\line
$ tar --list --file=collection.tar\line
folk\line
jazz\line
rock\line
$\par
\pard\f0{}}\par
\pard{}The {\f1{}--delete} option has been reported to work properly when {\f1{}tar} acts as a filter from {\f1{}stdin} to {\f1{}stdout}.\par
\par
\page\pard Node: {\b compare}, \keepn Next: {\uldb }{\v }, Prev: {\uldb delete}{\v delete}, Up: {\uldb Advanced tar}{\v Advanced_tar}\line
K{\footnote K compare}
#{\footnote compare}
${\footnote \pard{}Comparing Archive Members with the File System}\par
\pard{\fs24\b Comparing Archive Members with the File System}\par
\par
\pard{}{K{\footnote K Verifying the currency of an archive}}{{\par
{\i \pard\li720{}(This message will disappear, once this node revised.)}\par
\pard{}}}\par
\pard{}The {\f1{}--compare} ({\f1{}-d}), or {\f1{}--diff} operation compares specified archive members against files with the same names, and then reports differences in file size, mode, owner, modification date and contents.  You should {\i only} specify archive member names, not file names.  If you do not name any members, then {\f1{}tar} will compare the entire archive.  If a file is represented in the archive but does not exist in the file system, {\f1{}tar} reports a difference.\par
\par
\pard{}You have to specify the record size of the archive when modifying an archive with a non-default record size.\par
\par
{\f1{}\pard{}tar} ignores files in the file system that do not have corresponding members in the archive.\par
\par
\pard{}The following example compares the archive members {\f1{}rock}, {\f1{}blues} and {\f1{}funk} in the archive {\f1{}bluesrock.tar} with files of the same name in the file system.  (Note that there is no file, {\f1{}funk}; {\f1{}tar} will report an error message.)\par
\par
{\pard\keep\li720\f1{}$ tar --compare --file=bluesrock.tar rock blues funk\line
rock\line
blues\line
tar: funk not found in archive\par
\pard\f0{}}\par
\pard{}Depending on the system where you are running {\f1{}tar} and the version you are running, {\f1{}tar} may have a different error message, such as:\par
\par
{\pard\keep\li720\f1{}funk: does not exist\par
\pard\f0{}}\par
\pard{}The spirit behind the {\f1{}--compare} ({\f1{}--diff}, {\f1{}-d}) option is to check whether the archive represents the current state of files on disk, more than validating the integrity of the archive media.  For this later goal, See {\uldb verify}{\v verify}.\par
\par
\page\pard Node: {\b extract options}, \keepn Next: {\uldb backup}{\v backup}, Prev: {\uldb Advanced tar}{\v Advanced_tar}, Up: {\uldb operations}{\v operations}\line
K{\footnote K extract options}
#{\footnote extract_options}
${\footnote \pard{}Options Used by {\f1{}--extract}}\par
\pard{\fs24\b Options Used by {\f1{}--extract}}\par
\par
{{{\i \pard\li720{}(This message will disappear, once this node revised.)}\par
\pard{}}}\par
\pard{}The previous chapter showed how to use {\f1{}--extract} ({\f1{}--get}, {\f1{}-x}) to extract an archive into the filesystem.  Various options cause {\f1{}tar} to extract more information than just file contents, such as the owner, the permissions, the modification date, and so forth.  This section presents options to be used with {\f1{}--extract} when certain special considerations arise.  You may review the information presented in {\uldb extract}{\v extract} for more basic information about the {\f1{}--extract} operation.\par
\par
{\par
\pard\keep\fi-2880\li2880\tx2880{}{\uldb Reading}{\v Reading}\tab Options to Help Read Archives\par
{\uldb Writing}{\v Writing}\tab Changing How {\f1{}tar} Writes Files\par
{\uldb Scarce}{\v Scarce}\tab Coping with Scarce Resources\par
\pard{}}\par
\page\pard Node: {\b Reading}, \keepn Next: {\uldb Writing}{\v Writing}, Prev: {\uldb extract options}{\v extract_options}, Up: {\uldb extract options}{\v extract_options}\line
K{\footnote K Reading}
#{\footnote Reading}
${\footnote \pard{}Options to Help Read Archives}\par
\pard{\fs24\b Options to Help Read Archives}\par
\par
\pard{}{K{\footnote K Options when reading archives}}{K{\footnote K Reading incomplete records}}{K{\footnote K Records, incomplete}}{K{\footnote K End-of-archive entries, ignoring}}{K{\footnote K Ignoring end-of-archive entries}}{K{\footnote K Large lists of file names on small machines}}{K{\footnote K Small memory}}{K{\footnote K Running out of space}}{{\par
{\i \pard\li720{}(This message will disappear, once this node revised.)}\par
\pard{}}}\par
\pard{}Normally, {\f1{}tar} will request data in full record increments from an archive storage device.  If the device cannot return a full record, {\f1{}tar} will report an error.  However, some devices do not always return full records, or do not require the last record of an archive to be padded out to the next record boundary.  To keep reading until you obtain a full record, or to accept an incomplete record if it contains an end-of-archive marker, specify the {\f1{}--read-full-records} ({\f1{}-B}) option in conjunction with the {\f1{}--extract} ({\f1{}--get}, {\f1{}-x}) or {\f1{}--list} ({\f1{}-t}) operations.  See {\uldb Blocking}{\v Blocking}.\par
\par
\pard{}The {\f1{}--read-full-records} ({\f1{}-B}) option is turned on by default when {\f1{}tar} reads an archive from standard input, or from a remote machine.  This is because on BSD Unix systems, attempting to read a pipe returns however much happens to be in the pipe, even if it is less than was requested.  If this option were not enabled, {\f1{}tar} would fail as soon as it read an incomplete record from the pipe.\par
\par
\pard{}If you're not sure of the blocking factor of an archive, you can read the archive by specifying {\f1{}--read-full-records} ({\f1{}-B}) and {\f1{}--blocking-factor={\i 512-size}} ({\f1{}-b {\i 512-size}}), using a blocking factor larger than what the archive uses.  This lets you avoid having to determine the blocking factor of an archive.  See {\uldb Blocking Factor}{\v Blocking_Factor}.\par
\par
{\par
\pard\keep\fi-2880\li2880\tx2880{}{\uldb read full records}{\v read_full_records}\tab \par
{\uldb Ignore Zeros}{\v Ignore_Zeros}\tab \par
{\uldb Ignore Failed Read}{\v Ignore_Failed_Read}\tab\par
\pard{}}\par
\page\pard Node: {\b read full records}, \keepn Next: {\uldb Ignore Zeros}{\v Ignore_Zeros}, Prev: {\uldb Reading}{\v Reading}, Up: {\uldb Reading}{\v Reading}\line
K{\footnote K read full records}
#{\footnote read_full_records}
${\footnote \pard{}Reading Full Records}\par
\pard{\fs24\b Reading Full Records}\par
\par
{\pard{}{\f1{}--read-full-records}\par

\pard{}{\f1{}-B}\par
\pard\li720{}Use in conjunction with {\f1{}--extract} ({\f1{}--get}, {\f1{}-x}) to read an archive which contains incomplete records, or one which has a blocking factor less than the one specified.\par
\pard{}}\par
\page\pard Node: {\b Ignore Zeros}, \keepn Next: {\uldb Ignore Failed Read}{\v Ignore_Failed_Read}, Prev: {\uldb read full records}{\v read_full_records}, Up: {\uldb Reading}{\v Reading}\line
K{\footnote K Ignore Zeros}
#{\footnote Ignore_Zeros}
${\footnote \pard{}Ignoring Blocks of Zeros}\par
\pard{\fs24\b Ignoring Blocks of Zeros}\par
\par
\pard{}Normally, {\f1{}tar} stops reading when it encounters a block of zeros between file entries (which usually indicates the end of the archive).  {\f1{}--ignore-zeros} ({\f1{}-i}) allows {\f1{}tar} to completely read an archive which contains a block of zeros before the end (i.e. a damaged archive, or one which was created by {\f1{}cat}-ing several archives together).\par
\par
\pard{}The {\f1{}--ignore-zeros} ({\f1{}-i}) option is turned off by default because many versions of {\f1{}tar} write garbage after the end-of-archive entry, since that part of the media is never supposed to be read.  GNU {\f1{}tar} does not write after the end of an archive, but seeks to maintain compatablity among archiving utilities.\par
\par
{\pard{}{\f1{}--ignore-zeros}\par
\pard{}{\f1{}-i}\par
\pard\li720{}To ignore blocks of zeros (ie. end-of-archive entries) which may be encountered while reading an archive.  Use in conjunction with {\f1{}--extract} ({\f1{}--get}, {\f1{}-x}) or {\f1{}--list} ({\f1{}-t}).\par
\pard{}}\par
\page\pard Node: {\b Ignore Failed Read}, \keepn Next: {\uldb }{\v }, Prev: {\uldb Ignore Zeros}{\v Ignore_Zeros}, Up: {\uldb Reading}{\v Reading}\line
K{\footnote K Ignore Failed Read}
#{\footnote Ignore_Failed_Read}
${\footnote \pard{}Ignore Fail Read}\par
\pard{\fs24\b Ignore Fail Read}\par
\par
{\pard{}{\f1{}--ignore-failed-read}\par
\pard\li720{}Do not exit with nonzero on unreadable files or directories.\par
\pard{}}\par
\page\pard Node: {\b Writing}, \keepn Next: {\uldb Scarce}{\v Scarce}, Prev: {\uldb Reading}{\v Reading}, Up: {\uldb extract options}{\v extract_options}\line
K{\footnote K Writing}
#{\footnote Writing}
${\footnote \pard{}Changing How {\f1{}tar} Writes Files}\par
\pard{\fs24\b Changing How {\f1{}tar} Writes Files}\par
\par
\pard{}{K{\footnote K Overwriting old files, prevention}}{K{\footnote K Protecting old files}}{K{\footnote K Modification times of extracted files}}{K{\footnote K Permissions of extracted files}}{K{\footnote K Modes of extracted files}}{K{\footnote K Writing extracted files to standard output}}{K{\footnote K Standard output, writing extracted files to}}{{\par
{\i \pard\li720{}(This message will disappear, once this node revised.)}\par
\pard{}}}\par
{\par
\pard\keep\fi-2880\li2880\tx2880{}{\uldb Prevention Overwriting}{\v Prevention_Overwriting}\tab \par
{\uldb Keep Old Files}{\v Keep_Old_Files}\tab \par
{\uldb Unlink First}{\v Unlink_First}\tab \par
{\uldb Recursive Unlink}{\v Recursive_Unlink}\tab \par
{\uldb Modification Times}{\v Modification_Times}\tab \par
{\uldb Setting Access Permissions}{\v Setting_Access_Permissions}\tab \par
{\uldb Writing to Standard Output}{\v Writing_to_Standard_Output}\tab \par
{\uldb remove files}{\v remove_files}\tab\par
\pard{}}\par
\page\pard Node: {\b Prevention Overwriting}, \keepn Next: {\uldb Keep Old Files}{\v Keep_Old_Files}, Prev: {\uldb Writing}{\v Writing}, Up: {\uldb Writing}{\v Writing}\line
K{\footnote K Prevention Overwriting}
#{\footnote Prevention_Overwriting}
${\footnote \pard{}Options to Prevent Overwriting Files}\par
\pard{\fs24\b Options to Prevent Overwriting Files}\par
\par
\pard{}Normally, {\f1{}tar} writes extracted files into the file system without regard to the files already on the system; i.e., files with the same names as archive members are overwritten when the archive is extracted.  If the name of a corresponding file name is a symbolic link, the file pointed to by the symbolic link will be overwritten instead of the symbolic link itself (if this is possible).  Moreover, special devices, empty directories and even symbolic links are automatically removed if they are found to be on the way of the proper extraction.\par
\par
\pard{}To prevent {\f1{}tar} from extracting an archive member from an archive if doing so will overwrite a file in the file system, use {\f1{}--keep-old-files} ({\f1{}-k}) in conjunction with {\f1{}--extract}.  When this option is specified, {\f1{}tar} will report an error stating the name of the files in conflict instead of overwriting the file with the corresponding extracted archive member.\par
\par
\pard{}The {\f1{}--unlink-first} ({\f1{}-U}) option removes existing files, symbolic links, empty directories, devices, etc., {\i prior} to extracting over them.  In particular, using this option will prevent replacing an already existing symbolic link by the name of an extracted file, since the link itself is removed prior to the extraction, rather than the file it points to.  On some systems, the backing store for the executable {\i is} the original program text.  You could use the {\f1{}--unlink-first} ({\f1{}-U}) option to prevent segmentation violations or other woes when extracting arbitrary executables over currently running copies.  Note that if something goes wrong with the extraction and you {\i did} use this option, you might end up with no file at all.  Without this option, if something goes wrong with the extraction, the existing file is not overwritten and preserved.\par
\par
\pard{}If you specify the {\f1{}--recursive-unlink} option, {\f1{}tar} removes {\i anything} that keeps you from extracting a file as far as current permissions will allow it.  This could include removal of the contents of a full directory hierarchy.  For example, someone using this feature may be very surprised at the results when extracting a directory entry from the archive.  This option can be dangerous; be very aware of what you are doing if you choose to use it.\par
\par
{\par
\pard\keep\fi-2880\li2880\tx2880{}{\uldb Keep Old Files}{\v Keep_Old_Files}\tab \par
{\uldb Unlink First}{\v Unlink_First}\tab \par
{\uldb Recursive Unlink}{\v Recursive_Unlink}\tab\par
\pard{}}\par
\page\pard Node: {\b Keep Old Files}, \keepn Next: {\uldb Unlink First}{\v Unlink_First}, Prev: {\uldb Prevention Overwriting}{\v Prevention_Overwriting}, Up: {\uldb Writing}{\v Writing}\line
K{\footnote K Keep Old Files}
#{\footnote Keep_Old_Files}
${\footnote \pard{}Keep Old Files}\par
\pard{\fs24\b Keep Old Files}\par
\par
{\pard{}{\f1{}--keep-old-files}\par
\pard{}{\f1{}-k}\par
\pard\li720{}Do not overwrite existing files from archive.  The {\f1{}--keep-old-files} ({\f1{}-k}) option prevents {\f1{}tar} from over-writing existing files with files with the same name from the archive.  The {\f1{}--keep-old-files} ({\f1{}-k}) option is meaningless with {\f1{}--list} ({\f1{}-t}).  Prevents {\f1{}tar} from overwriting files in the file system during extraction.\par
\pard{}}\par
\page\pard Node: {\b Unlink First}, \keepn Next: {\uldb Recursive Unlink}{\v Recursive_Unlink}, Prev: {\uldb Keep Old Files}{\v Keep_Old_Files}, Up: {\uldb Writing}{\v Writing}\line
K{\footnote K Unlink First}
#{\footnote Unlink_First}
${\footnote \pard{}Unlink First}\par
\pard{\fs24\b Unlink First}\par
\par
{\pard{}{\f1{}--unlink-first}\par
\pard{}{\f1{}-U}\par
\pard\li720{}Try removing files before extracting over them, instead of trying to overwrite them.\par
\pard{}}\par
\page\pard Node: {\b Recursive Unlink}, \keepn Next: {\uldb Modification Times}{\v Modification_Times}, Prev: {\uldb Unlink First}{\v Unlink_First}, Up: {\uldb Writing}{\v Writing}\line
K{\footnote K Recursive Unlink}
#{\footnote Recursive_Unlink}
${\footnote \pard{}Recursive Unlink}\par
\pard{\fs24\b Recursive Unlink}\par
\par
{\pard{}{\f1{}--recursive-unlink}\par
\pard\li720{}When this option is specified, try removing files and directory hierarchies before extracting over them.  {\i This is a dangerous option!}\par
\pard{}}\par
\pard{}Some people argue that GNU {\f1{}tar} should not hesitate to overwrite files with other files when extracting.  When extracting a {\f1{}tar} archive, they expect to see a faithful copy of the state of the filesystem when the archive was created.  It is debatable that this would always be a proper behaviour.  For example, suppose one has an archive in which {\f1{}usr/local} is a link to {\f1{}usr/local2}.  Since then, maybe the site removed the link and renamed the whole hierarchy from {\f1{}/usr/local2} to {\f1{}/usr/local}.  Such things happen all the time.  I guess it would not be welcome at all that GNU {\f1{}tar} removes the whole hierarchy just to make room for the link to be reinstated (unless it {\i also} simultaneously restores the full {\f1{}/usr/local2}, of course!  GNU {\f1{}tar} is indeed able to remove a whole hierarchy to reestablish a symbolic link, for example, but {\i only if} {\f1{}--recursive-unlink} is specified to allow this behaviour.  In any case, single files are silently removed.\par
\par
\page\pard Node: {\b Modification Times}, \keepn Next: {\uldb Setting Access Permissions}{\v Setting_Access_Permissions}, Prev: {\uldb Recursive Unlink}{\v Recursive_Unlink}, Up: {\uldb Writing}{\v Writing}\line
K{\footnote K Modification Times}
#{\footnote Modification_Times}
${\footnote \pard{}Setting Modification Times}\par
\pard{\fs24\b Setting Modification Times}\par
\par
\pard{}Normally, {\f1{}tar} sets the modification times of extracted files to the modification times recorded for the files in the archive, but limits the permissions of extracted files by the current {\f1{}umask} setting.\par
\par
\pard{}To set the modification times of extracted files to the time when the files were extracted, use the {\f1{}--touch} ({\f1{}-m}) option in conjunction with {\f1{}--extract} ({\f1{}--get}, {\f1{}-x}).\par
\par
{\pard{}{\f1{}--touch}\par
\pard{}{\f1{}-m}\par
\pard\li720{}Sets the modification time of extracted archive members to the time they were extracted, not the time recorded for them in the archive.  Use in conjunction with {\f1{}--extract} ({\f1{}--get}, {\f1{}-x}).\par
\pard{}}\par
\page\pard Node: {\b Setting Access Permissions}, \keepn Next: {\uldb Writing to Standard Output}{\v Writing_to_Standard_Output}, Prev: {\uldb Modification Times}{\v Modification_Times}, Up: {\uldb Writing}{\v Writing}\line
K{\footnote K Setting Access Permissions}
#{\footnote Setting_Access_Permissions}
${\footnote \pard{}Setting Access Permissions}\par
\pard{\fs24\b Setting Access Permissions}\par
\par
\pard{}To set the modes (access permissions) of extracted files to those recorded for those files in the archive, use {\f1{}--same-persmissions} in conjunction with the {\f1{}--extract} ({\f1{}--get}, {\f1{}-x}) operation.\par
\par
{\pard{}{\f1{}--preserve-permission}\par
\pard{}{\f1{}--same-permission}\par
\pard{}{\f1{}--ignore-umask}\par
\pard{}{\f1{}-p}\par
\pard\li720{}Set modes of extracted archive members to those recorded in the archive, instead of current umask settings.  Use in conjunction with {\f1{}--extract} ({\f1{}--get}, {\f1{}-x}).\par
\pard{}}\par
\page\pard Node: {\b Writing to Standard Output}, \keepn Next: {\uldb remove files}{\v remove_files}, Prev: {\uldb Setting Access Permissions}{\v Setting_Access_Permissions}, Up: {\uldb Writing}{\v Writing}\line
K{\footnote K Writing to Standard Output}
#{\footnote Writing_to_Standard_Output}
${\footnote \pard{}Writing to Standard Output}\par
\pard{\fs24\b Writing to Standard Output}\par
\par
\pard{}To write the extracted files to the standard output, instead of creating the files on the file system, use {\f1{}--to-stdout} ({\f1{}-O}) in conjunction with {\f1{}--extract} ({\f1{}--get}, {\f1{}-x}).  This option is useful if you are extracting files to send them through a pipe, and do not need to preserve them in the file system.  If you extract multiple members, they appear on standard output concatenated, in the order they are found in the archive.\par
\par
{\pard{}{\f1{}--to-stdout}\par
\pard{}{\f1{}-O}\par
\pard\li720{}Writes files to the standard output.  Used in conjunction with {\f1{}--extract} ({\f1{}--get}, {\f1{}-x}).  Extract files to standard output.  When this option is used, instead of creating the files specified, {\f1{}tar} writes the contents of the files extracted to its standard output.  This may be useful if you are only extracting the files in order to send them through a pipe.  This option is meaningless with {\f1{}--list} ({\f1{}-t}).\par
\pard{}}\par
\page\pard Node: {\b remove files}, \keepn Next: {\uldb }{\v }, Prev: {\uldb Writing to Standard Output}{\v Writing_to_Standard_Output}, Up: {\uldb Writing}{\v Writing}\line
K{\footnote K remove files}
#{\footnote remove_files}
${\footnote \pard{}Removing Files}\par
\pard{\fs24\b Removing Files}\par
\par
{\pard{}{\f1{}--remove-files}\par
\pard\li720{}Remove files after adding them to the archive.\par
\pard{}}\par
\page\pard Node: {\b Scarce}, \keepn Next: {\uldb }{\v }, Prev: {\uldb Writing}{\v Writing}, Up: {\uldb extract options}{\v extract_options}\line
K{\footnote K Scarce}
#{\footnote Scarce}
${\footnote \pard{}Coping with Scarce Resources}\par
\pard{\fs24\b Coping with Scarce Resources}\par
\par
\pard{}{K{\footnote K Middle of the archive, starting in the}}{K{\footnote K Running out of space during extraction}}{K{\footnote K Disk space, running out of}}{K{\footnote K Space on the disk, recovering from lack of}}{{\par
{\i \pard\li720{}(This message will disappear, once this node revised.)}\par
\pard{}}}\par
{\par
\pard\keep\fi-2880\li2880\tx2880{}{\uldb Starting File}{\v Starting_File}\tab \par
{\uldb Same Order}{\v Same_Order}\tab\par
\pard{}}\par
\page\pard Node: {\b Starting File}, \keepn Next: {\uldb Same Order}{\v Same_Order}, Prev: {\uldb Scarce}{\v Scarce}, Up: {\uldb Scarce}{\v Scarce}\line
K{\footnote K Starting File}
#{\footnote Starting_File}
${\footnote \pard{}Starting File}\par
\pard{\fs24\b Starting File}\par
\par
{\pard{}{\f1{}--starting-file={\i name}}\par
\pard{}{\f1{}-K {\i name}}\par
\pard\li720{}Starts an operation in the middle of an archive.  Use in conjunction with {\f1{}--extract} ({\f1{}--get}, {\f1{}-x}) or {\f1{}--list} ({\f1{}-t}).\par
\pard{}}\par
\pard{}If a previous attempt to extract files failed due to lack of disk space, you can use {\f1{}--starting-file={\i name}} ({\f1{}-K {\i name}}) to start extracting only after member {\i name} of the archive.  This assumes, of course, that there is now free space, or that you are now extracting into a different file system.  (You could also choose to suspend {\f1{}tar}, remove unnecessary files from the file system, and then restart the same {\f1{}tar} operation.  In this case, {\f1{}--starting-file={\i name}} ({\f1{}-K {\i name}}) is not necessary.  See {\uldb Inc Dumps}{\v Inc_Dumps}, See {\uldb interactive}{\v interactive}, and {\uldb exclude}{\v exclude}.)\par
\par
\page\pard Node: {\b Same Order}, \keepn Next: {\uldb }{\v }, Prev: {\uldb Starting File}{\v Starting_File}, Up: {\uldb Scarce}{\v Scarce}\line
K{\footnote K Same Order}
#{\footnote Same_Order}
${\footnote \pard{}Same Order}\par
\pard{\fs24\b Same Order}\par
\par
{\pard{}{\f1{}--same-order}\par
\pard{}{\f1{}--preserve-order}\par
\pard{}{\f1{}-s}\par
\pard\li720{}To process large lists of file names on machines with small amounts of memory.  Use in conjunction with {\f1{}--compare} ({\f1{}--diff}, {\f1{}-d}), {\f1{}--list} ({\f1{}-t}) or {\f1{}--extract} ({\f1{}--get}, {\f1{}-x}).\par
\pard{}}\par
\pard{}The {\f1{}--same-order} ({\f1{}--preserve-order}, {\f1{}-s}) option tells {\f1{}tar} that the list of file names to be listed or extracted is sorted in the same order as the files in the archive.  This allows a large list of names to be used, even on a small machine that would not otherwise be able to hold all the names in memory at the same time.  Such a sorted list can easily be created by running {\f1{}tar -t} on the archive and editing its output.\par
\par
\pard{}This option is probably never needed on modern computer systems.\par
\par
\page\pard Node: {\b backup}, \keepn Next: {\uldb Applications}{\v Applications}, Prev: {\uldb extract options}{\v extract_options}, Up: {\uldb operations}{\v operations}\line
K{\footnote K backup}
#{\footnote backup}
${\footnote \pard{}Backup options}\par
\pard{\fs24\b Backup options}\par
\par
\pard{}{K{\footnote K backup options}} GNU {\f1{}tar} offers options for making backups of files before writing new versions.  These options control the details of these backups.  They may apply to the archive itself before it is created or rewritten, as well as individual extracted members.  Other GNU programs ({\f1{}cp}, {\f1{}install}, {\f1{}ln}, and {\f1{}mv}, for example) offer similar options.\par
\par
\pard{}Backup options may prove unexpectedly useful when extracting archives containing many members having identical name, or when extracting archives on systems having file name limitations, making different members appear has having similar names through the side-effect of name truncation.  (This is true only if we have a good scheme for truncated backup names, which I'm not sure at all: I suspect work is needed in this area.)  When any existing file is backed up before being overwritten by extraction, then clashing files are automatically be renamed to be unique, and the true name is kept for only the last file of a series of clashing files.  By using verbose mode, users may track exactly what happens.\par
\par
\pard{}At the detail level, some decisions are still experimental, and may change in the future, we are waiting comments from our users.  So, please do not learn to depend blindly on the details of the backup features.  For example, currently, directories themselves are never renamed through using these options, so, extracting a file over a directory still has good chances to fail.  Also, backup options apply to created archives, not only to extracted members.  For created archives, backups will not be attempted when the archive is a block or character device, or when it refers to a remote file.\par
\par
\pard{}For the sake of simplicity and efficiency, backups are made by renaming old files prior to creation or extraction, and not by copying.  The original name is restored if the file creation fails.  If a failure occurs after a partial extraction of a file, both the backup and the partially extracted file are kept.\par
\par
{\pard{}{\f1{}--backup}\par
\pard\li720{}{K{\footnote K -backup}}{K{\footnote K backups, making}}Make backups of files that are about to be overwritten or removed.  Without this option, the original versions are destroyed.\par
\par
\pard{}{\f1{}--suffix={\i suffix}}\par
\pard\li720{}{K{\footnote K -suffix}}{K{\footnote K backup suffix}}{K{\footnote K SIMPLE_BACKUP_SUFFIX}}Append {\i suffix} to each backup file made with {\f1{}-b}.  If this option is not specified, the value of the {\f1{}SIMPLE_BACKUP_SUFFIX} environment variable is used.  And if {\f1{}SIMPLE_BACKUP_SUFFIX} is not set, the default is {\f1{}~}, just as in Emacs.\par
\par
\pard{}{\f1{}--version-control={\i method}}\par
\pard\li720{}{K{\footnote K -version-control}}{K{\footnote K VERSION_CONTROL}}{K{\footnote K backup files, type made}}Use {\i method} to determine the type of backups made with {\f1{}--backup}.  If this option is not specified, the value of the {\f1{}VERSION_CONTROL} environment variable is used.  And if {\f1{}VERSION_CONTROL} is not set, the default backup type is {\f1{}existing}.\par
\par
\pard\li720{}{K{\footnote K version-control Emacs variable}}This option corresponds to the Emacs variable {\f1{}version-control}; the same values for {\i method} are accepted as in Emacs.  This options also more descriptive name.  The valid {\i method}s (unique abbreviations are accepted):\par
\par
{\pard\li720{}{\f1{}t}\par
\pard\li720{}{\f1{}numbered}\par
\pard\li1440{}{K{\footnote K numbered backup method}}Always make numbered backups.\par
\par
\pard\li720{}{\f1{}nil}\par
\pard\li720{}{\f1{}existing}\par
\pard\li1440{}{K{\footnote K existing backup method}}Make numbered backups of files that already have them, simple backups of the others.\par
\par
\pard\li720{}{\f1{}never}\par
\pard\li720{}{\f1{}simple}\par
\pard\li1440{}{K{\footnote K simple backup method}}Always make simple backups.\par
\par
\pard\li720{}}\par
\pard{}}\par
\pard{}Some people express the desire to {\i always} use the {\i op-backup} option, by defining some kind of alias or script.  This is not as easy as one may thing, due to the fact old style options should appear first and consume arguments a bit inpredictably for an alias or script.  But, if you are ready to give up using old style options, you may resort to using something like (a Bourne shell function here):\par
\par
{\pard\keep\li720\f1{}tar () \'7B /usr/local/bin/tar --backup $*; \'7D\par
\pard\f0{}}\par
\page\pard Node: {\b Applications}, \keepn Next: {\uldb looking ahead}{\v looking_ahead}, Prev: {\uldb backup}{\v backup}, Up: {\uldb operations}{\v operations}\line
K{\footnote K Applications}
#{\footnote Applications}
${\footnote \pard{}Notable {\f1{}tar} Usages}\par
\pard{\fs24\b Notable {\f1{}tar} Usages}\par
\par
{{{\i \pard\li720{}(This message will disappear, once this node revised.)}\par
\pard{}}}\par
\pard{}{K{\footnote K uuencode}}You can easily use archive files to transport a group of files from one system to another: put all relevant files into an archive on one computer system, transfer the archive to another system, and extract the contents there.  The basic transfer medium might be magnetic tape, Internet FTP, or even electronic mail (though you must encode the archive with {\f1{}uuencode} in order to transport it properly by mail).  Both machines do not have to use the same operating system, as long as they both support the {\f1{}tar} program.\par
\par
\pard{}For example, here is how you might copy a directory's contents from one disk to another, while preserving the dates, modes, owners and link-structure of all the files therein.  In this case, the transfer medium is a \'A2pipe\'A2, which is one a Unix redirection mechanism:\par
\par
{\pard\keep\li720\f1{}$ cd sourcedir; tar -cf - . | (cd targetdir; tar -xf -)\par
\pard\f0{}}\par
\pard{}The command also works using short option forms:\par
\par
{\pard\keep\li720\f1{}$ cd sourcedir; tar --create --file=- . | (cd targetdir; tar --extract --file=-)\par
\pard\f0{}}\par
\pard{}This is one of the easiest methods to transfer a {\f1{}tar} archive.\par
\par
\page\pard Node: {\b looking ahead}, \keepn Next: {\uldb }{\v }, Prev: {\uldb Applications}{\v Applications}, Up: {\uldb operations}{\v operations}\line
K{\footnote K looking ahead}
#{\footnote looking_ahead}
${\footnote \pard{}Looking Ahead: The Rest of this Manual}\par
\pard{\fs24\b Looking Ahead: The Rest of this Manual}\par
\par
\pard{}You have now seen how to use all eight of the operations available to {\f1{}tar}, and a number of the possible options.  The next chapter explains how to choose and change file and archive names, how to use files to store names of other files which you can then call as arguments to {\f1{}tar} (this can help you save time if you expect to archive the same list of files a number of times), and how to\par
\par
\pard{}If there are too many files to conveniently list on the command line, you can list the names in a file, and {\f1{}tar} will read that file.  See {\uldb files}{\v files}.\par
\par
\pard{}There are various ways of causing {\f1{}tar} to skip over some files, and not archive them.  See {\uldb Choosing}{\v Choosing}.\par
\par
\page\pard Node: {\b Backups}, \keepn Next: {\uldb Choosing}{\v Choosing}, Prev: {\uldb operations}{\v operations}, Up: {\uldb Top}{\v Top}\line
K{\footnote K Backups}
#{\footnote Backups}
${\footnote \pard{}Performing Backups and Restoring Files}\par
\pard{\fs24\b Performing Backups and Restoring Files}\par
\par
{{{\i \pard\li720{}(This message will disappear, once this node revised.)}\par
\pard{}}}\par
\pard{}GNU {\f1{}tar} is distributed along with the scripts which the Free Software Foundation uses for performing backups.  There is no corresponding scripts available yet for doing restoration of files.  Even if there is a good chance those scripts may be satisfying to you, they are not the only scripts or methods available for doing backups and restore.  You may well create your own, or use more sophisticated packages dedicated to that purpose.\par
\par
\pard{}Some users are enthusiastic about {\f1{}Amanda} (The Advanced Maryland Automatic Network Disk Archiver), a backup system developed by James da Silva {\f1{}jds@cs.umd.edu} and available on many Unix systems.  This is free software, and it is available at these places:\par
\par
{\pard\keep\li720\f1{}http://www.cs.umd.edu/projects/amanda/amanda.html\line
ftp://ftp.cs.umd.edu/pub/amanda\par
\pard\f0{}}\par
{\pard{}Here is a possible plan for a future documentation about the backuping scripts which are provided within the GNU {\f1{}tar} distribution.\par
\par
{\pard\keep\li720\f1{}.* dumps\line
. + what are dumps\line
\line
. + different levels of dumps\line
.  - full dump = dump everything\line
.  - level 1, level 2 dumps etc, -\line
	A level n dump dumps everything changed since the last level\line
	n-1 dump (?)\line
\line
. + how to use scripts for dumps  (ie, the concept)\line
.  - scripts to run after editing backup specs (details)\line
\line
. + Backup Specs, what is it.\line
.  - how to customize\line
.  - actual text of script  [/sp/dump/backup-specs]\line
\line
. + Problems\line
.  - rsh doesn't work\line
.  - rtape isn't installed\line
.  - (others?)\line
\line
. + the --incremental option of tar\line
\line
. + tapes\line
.  - write protection\line
.  - types of media\line
.   : different sizes and types, useful for different things\line
.  - files and tape marks\line
     one tape mark between files, two at end.\line
.  - positioning the tape\line
     MT writes two at end of write,\line
       backspaces over one when writing again.\par
\pard\f0{}}\par
}\pard{}This chapter documents both the provided FSF scripts and {\f1{}tar} options which are more specific to usage as a backup tool.\par
\par
\pard{}To \'A2back up\'A2 a file system means to create archives that contain all the files in that file system.  Those archives can then be used to restore any or all of those files (for instance if a disk crashes or a file is accidently deleted).  File system \'A2backups\'A2 are also called \'A2dumps\'A2.\par
\par
{\par
\pard\keep\fi-2880\li2880\tx2880{}{\uldb Full Dumps}{\v Full_Dumps}\tab Using {\f1{}tar} to Perform Full Dumps\par
{\uldb Inc Dumps}{\v Inc_Dumps}\tab Using {\f1{}tar} to Perform Incremental Dumps\par
{\uldb incremental and listed-incremental}{\v incremental_and_listed_incremental}\tab The Incremental Options\par
{\uldb Backup Levels}{\v Backup_Levels}\tab Levels of Backups\par
{\uldb Backup Parameters}{\v Backup_Parameters}\tab Setting Parameters for Backups and Restoration\par
{\uldb Scripted Backups}{\v Scripted_Backups}\tab Using the Backup Scripts\par
{\uldb Scripted Restoration}{\v Scripted_Restoration}\tab Using the Restore Script\par
\pard{}}\par
\page\pard Node: {\b Full Dumps}, \keepn Next: {\uldb Inc Dumps}{\v Inc_Dumps}, Prev: {\uldb Backups}{\v Backups}, Up: {\uldb Backups}{\v Backups}\line
K{\footnote K Full Dumps}
#{\footnote Full_Dumps}
${\footnote \pard{}Using {\f1{}tar} to Perform Full Dumps}\par
\pard{\fs24\b Using {\f1{}tar} to Perform Full Dumps}\par
\par
{{{\i \pard\li720{}(This message will disappear, once this node revised.)}\par
\pard{}}}\par
\pard{}{K{\footnote K full dumps}}{K{\footnote K dumps, full}} {K{\footnote K corrupted archives}}Full dumps should only be made when no other people or programs are modifying files in the filesystem.  If files are modified while {\f1{}tar} is making the backup, they may not be stored properly in the archive, in which case you won't be able to restore them if you have to.  (Files not being modified are written with no trouble, and do not corrupt the entire archive.)\par
\par
\pard{}You will want to use the {\f1{}--label={\i archive-label}} ({\f1{}-V {\i archive-label}}) option to give the archive a volume label, so you can tell what this archive is even if the label falls off the tape, or anything like that.\par
\par
\pard{}Unless the filesystem you are dumping is guaranteed to fit on one volume, you will need to use the {\f1{}--multi-volume} ({\f1{}-M}) option.  Make sure you have enough tapes on hand to complete the backup.\par
\par
\pard{}If you want to dump each filesystem separately you will need to use the {\f1{}--one-file-system} ({\f1{}-l}) option to prevent {\f1{}tar} from crossing filesystem boundaries when storing (sub)directories.\par
\par
\pard{}The {\f1{}--incremental} ({\f1{}-G}) option is not needed, since this is a complete copy of everything in the filesystem, and a full restore from this backup would only be done onto a completely empty disk.\par
\par
\pard{}Unless you are in a hurry, and trust the {\f1{}tar} program (and your tapes), it is a good idea to use the {\f1{}--verify} ({\f1{}-W}) option, to make sure your files really made it onto the dump properly.  This will also detect cases where the file was modified while (or just after) it was being archived.  Not all media (notably cartridge tapes) are capable of being verified, unfortunately.\par
\par
\pa\'7BNo Value For "rd\'7B\'7Dop-listed-incremental"\'7D take a file name argument always.  If the file doesn't exist, run a level zero dump, creating the file.  If the file exists, uses that file to see what has changed.\par
\par
\pa\'7BNo Value For "rd\'7B\'7Dop-incremental"\'7D\par
\par
\pa\'7BNo Value For "rd\'7B\'7Dop-incremental"\'7D handle old GNU-format incremental backup.\par
\par
\pard{}This option should only be used when creating an incremental backup of a filesystem.  When the {\f1{}--incremental} ({\f1{}-G}) option is used, {\f1{}tar} writes, at the beginning of the archive, an entry for each of the directories that will be operated on.  The entry for a directory includes a list of all the files in the directory at the time the dump was done, and a flag for each file indicating whether the file is going to be put in the archive.  This information is used when doing a complete incremental restore.\par
\par
\pard{}Note that this option causes {\f1{}tar} to create a non-standard archive that may not be readable by non-GNU versions of the {\f1{}tar} program.\par
\par
\pard{}The {\f1{}--incremental} ({\f1{}-G}) option means the archive is an incremental backup.  Its meaning depends on the command that it modifies.\par
\par
\pard{}If the {\f1{}--incremental} ({\f1{}-G}) option is used with {\f1{}--list} ({\f1{}-t}), {\f1{}tar} will list, for each directory in the archive, the list of files in that directory at the time the archive was created.  This information is put out in a format that is not easy for humans to read, but which is unambiguous for a program: each file name is preceded by either a {\f1{}Y} if the file is present in the archive, an {\f1{}N} if the file is not included in the archive, or a {\f1{}D} if the file is a directory (and is included in the archive).  Each file name is terminated by a null character.  The last file is followed by an additional null and a newline to indicate the end of the data.\par
\par
\pard{}If the {\f1{}--incremental} ({\f1{}-G}) option is used with {\f1{}--extract} ({\f1{}--get}, {\f1{}-x}), then when the entry for a directory is found, all files that currently exist in that directory but are not listed in the archive {\i are deleted from the directory}.\par
\par
\pard{}This behavior is convenient when you are restoring a damaged file system from a succession of incremental backups: it restores the entire state of the file system to that which obtained when the backup was made.  If you don't use {\f1{}--incremental} ({\f1{}-G}), the file system will probably fill up with files that shouldn't exist any more.\par
\par
\pa\'7BNo Value For "rd\'7B\'7Dop-listed-incremental"\'7D handle new GNU-format incremental backup.  This option handles new GNU-format incremental backup.  It has much the same effect as {\f1{}--incremental} ({\f1{}-G}), but also the time when the dump is done and the list of directories dumped is written to the given {\i file}. When restoring, only files newer than the saved time are restored, and the direcotyr list is used to speed up operations.\par
\par
\pa\'7BNo Value For "rd\'7B\'7Dop-listed-incremental"\'7D acts like {\f1{}--incremental} ({\f1{}-G}), but when used in conjunction with {\f1{}--create} ({\f1{}-c}) will also cause {\f1{}tar} to use the file {\i file}, which contains information about the state of the filesystem at the time of the last backup, to decide which files to include in the archive being created.  That file will then be updated by {\f1{}tar}.  If the file {\i file} does not exist when this option is specified, {\f1{}tar} will create it, and include all appropriate files in the archive.\par
\par
\pard{}The file, which is archive independent, contains the date it was last modified and a list of devices, inode numbers and directory names.  {\f1{}tar} will archive files with newer mod dates or inode change times, and directories with an unchanged inode number and device but a changed directory name.  The file is updated after the files to be archived are determined, but before the new archive is actually created.\par
\par
\pard{}GNU {\f1{}tar} actually writes the file twice: once before the data and written, and once after.\par
\par
\page\pard Node: {\b Inc Dumps}, \keepn Next: {\uldb incremental and listed-incremental}{\v incremental_and_listed_incremental}, Prev: {\uldb Full Dumps}{\v Full_Dumps}, Up: {\uldb Backups}{\v Backups}\line
K{\footnote K Inc Dumps}
#{\footnote Inc_Dumps}
${\footnote \pard{}Using {\f1{}tar} to Perform Incremental Dumps}\par
\pard{\fs24\b Using {\f1{}tar} to Perform Incremental Dumps}\par
\par
{{{\i \pard\li720{}(This message will disappear, once this node revised.)}\par
\pard{}}}\par
\pard{}{K{\footnote K incremental dumps}}{K{\footnote K dumps, incremental}} Performing incremental dumps is similar to performing full dumps, although a few more options will usually be needed.\par
\par
\pard{}You will need to use the {\f1{}-N {\i date}} option to tell {\f1{}tar} to only store files that have been modified since {\i date}.  {\i date} should be the date and time of the last full/incremental dump.\par
\par
\pard{}A standard scheme is to do a {\i monthly} (full) dump once a month, a {\i weekly} dump once a week of everything since the last monthly and a {\i daily} every day of everything since the last (weekly or monthly) dump.\par
\par
\pard{}Here is a copy of the script used to dump the filesystems of the machines here at the Free Software Foundation.  This script is run via {\f1{}cron} late at night when people are least likely to be using the machines.  This script dumps several filesystems from several machines at once (via NFS).  The operator is responsible for ensuring that all the machines will be up at the time the dump happens.  If a machine is not running, its files will not be dumped, and the next day's incremental dump will {\i not} store files that would have gone onto that dump.\par
\par
{\pard\keep\li720\f1{}#!/bin/csh\line
# Dump thingie\line
set now = `date`\line
set then = `cat date.nfs.dump`\line
/u/hack/bin/tar -c -G -v\'5C\line
 -f /dev/rtu20\'5C\line
 -b 126\'5C\line
 -N "$then"\'5C\line
 -V "Dump from $then to $now"\'5C\line
 /alpha-bits/gp\'5C\line
 /gnu/hack\'5C\line
 /hobbes/u\'5C\line
 /spiff/u\'5C\line
 /sugar-bombs/u\line
echo $now > date.nfs.dump\line
mt -f /dev/rtu20 rew\par
\pard\f0{}}\par
\pard{}Output from this script is stored in a file, for the operator to read later.\par
\par
\pard{}This script uses the file {\f1{}date.nfs.dump} to store the date/time of the last dump.\par
\par
\pard{}Since this is a streaming tape drive, no attempt to verify the archive is done.  This is also why the high blocking factor (126) is used.  The tape drive must also be rewound by the {\f1{}mt} command after the dump is made.\par
\par
\page\pard Node: {\b incremental and listed-incremental}, \keepn Next: {\uldb Backup Levels}{\v Backup_Levels}, Prev: {\uldb Inc Dumps}{\v Inc_Dumps}, Up: {\uldb Backups}{\v Backups}\line
K{\footnote K incremental and listed-incremental}
#{\footnote incremental_and_listed_incremental}
${\footnote \pard{}The Incremental Options}\par
\pard{\fs24\b The Incremental Options}\par
\par
{{{\i \pard\li720{}(This message will disappear, once this node revised.)}\par
\pard{}}}\par
\pa\'7BNo Value For "rd\'7B\'7Dop-incremental"\'7D is used in conjunction with {\f1{}--create} ({\f1{}-c}), {\f1{}--extract} ({\f1{}--get}, {\f1{}-x}) or {\f1{}--list} ({\f1{}-t}) when backing up and restoring file systems.  An archive cannot be extracted or listed with the {\f1{}--incremental} ({\f1{}-G}) option specified unless it was created with the option specified.  This option should only be used by a script, not by the user, and is usually disregarded in favor of {\f1{}--listed-incremental={\i snapshot-file}} ({\f1{}-g {\i snapshot-file}}), which is described below.\par
\par
\pa\'7BNo Value For "rd\'7B\'7Dop-incremental"\'7D in conjunction with {\f1{}--create} ({\f1{}-c}) causes {\f1{}tar} to write, at the beginning of the archive, an entry for each of the directories that will be archived.  The entry for a directory includes a list of all the files in the directory at the time the archive was created and a flag for each file indicating whether or not the file is going to be put in the archive.\par
\par
\pard{}Note that this option causes {\f1{}tar} to create a non-standard archive that may not be readable by non-GNU versions of the {\f1{}tar} program.\par
\par
\pa\'7BNo Value For "rd\'7B\'7Dop-incremental"\'7D in conjunction with {\f1{}--extract} ({\f1{}--get}, {\f1{}-x}) causes {\f1{}tar} to read the lists of directory contents previously stored in the archive, {\i delete} files in the file system that did not exist in their directories when the archive was created, and then extract the files in the archive.\par
\par
\pard{}This behavior is convenient when restoring a damaged file system from a succession of incremental backups: it restores the entire state of the file system to that which obtained when the backup was made.  If {\f1{}--incremental} ({\f1{}-G}) isn't specified, the file system will probably fill up with files that shouldn't exist any more.\par
\par
\pa\'7BNo Value For "rd\'7B\'7Dop-incremental"\'7D in conjunction with {\f1{}--list} ({\f1{}-t}), causes {\f1{}tar} to print, for each directory in the archive, the list of files in that directory at the time the archive was created.  This information is put out in a format that is not easy for humans to read, but which is unambiguous for a program: each file name is preceded by either a {\f1{}Y} if the file is present in the archive, an {\f1{}N} if the file is not included in the archive, or a {\f1{}D} if the file is a directory (and is included in the archive).  Each file name is terminated by a null character.  The last file is followed by an additional null and a newline to indicate the end of the data.\par
\par
\pa\'7BNo Value For "rd\'7B\'7Dop-listed-incremental"\'7D acts like {\f1{}--incremental} ({\f1{}-G}), but when used in conjunction with {\f1{}--create} ({\f1{}-c}) will also cause {\f1{}tar} to use the file {\i snapshot-file}, which contains information about the state of the file system at the time of the last backup, to decide which files to include in the archive being created.  That file will then be updated by {\f1{}tar}.  If the file {\i file} does not exist when this option is specified, {\f1{}tar} will create it, and include all appropriate files in the archive.\par
\par
\pard{}The file {\i file}, which is archive independent, contains the date it was last modified and a list of devices, inode numbers and directory names.  {\f1{}tar} will archive files with newer mod dates or inode change times, and directories with an unchanged inode number and device but a changed directory name.  The file is updated after the files to be archived are determined, but before the new archive is actually created.\par
\par
\pard{}Despite it should be obvious that a device has a non-volatile value, NFS devices have non-dependable values when an automounter gets in the picture.  This led to a great deal of spurious redumping in incremental dumps, so it is somewhat useless to compare two NFS devices numbers over time.  So {\f1{}tar} now considers all NFS devices as being equal when it comes to comparing directories; this is fairly gross, but there does not seem to be a better way to go.\par
\par
\page\pard Node: {\b Backup Levels}, \keepn Next: {\uldb Backup Parameters}{\v Backup_Parameters}, Prev: {\uldb incremental and listed-incremental}{\v incremental_and_listed_incremental}, Up: {\uldb Backups}{\v Backups}\line
K{\footnote K Backup Levels}
#{\footnote Backup_Levels}
${\footnote \pard{}Levels of Backups}\par
\pard{\fs24\b Levels of Backups}\par
\par
{{{\i \pard\li720{}(This message will disappear, once this node revised.)}\par
\pard{}}}\par
\pard{}An archive containing all the files in the file system is called a \'A2full backup\'A2 or \'A2full dump\'A2.  You could insure your data by creating a full dump every day.  This strategy, however, would waste a substantial amount of archive media and user time, as unchanged files are daily re-archived.\par
\par
\pard{}It is more efficient to do a full dump only occasionally.  To back up files between full dumps, you can a incremental dump.  A \'A2level one\'A2 dump archives all the files that have changed since the last full dump.\par
\par
\pard{}A typical dump strategy would be to perform a full dump once a week, and a level one dump once a day.  This means some versions of files will in fact be archived more than once, but this dump strategy makes it possible to restore a file system to within one day of accuracy by only extracting two archives--the last weekly (full) dump and the last daily (level one) dump.  The only information lost would be in files changed or created since the last daily backup.  (Doing dumps more than once a day is usually not worth the trouble).\par
\par
\pard{}GNU {\f1{}tar} comes with scripts you can use to do full and level-one dumps.  Using scripts (shell programs) to perform backups and restoration is a convenient and reliable alternative to typing out file name lists and {\f1{}tar} commands by hand.\par
\par
\pard{}Before you use these scripts, you need to edit the file {\f1{}backup-specs}, which specifies parameters used by the backup scripts and by the restore script.  .  .  Once the backup parameters are set, you can perform backups or restoration by running the appropriate script.\par
\par
\pard{}The name of the restore script is {\f1{}restore}.  .  The names of the level one and full backup scripts are, respectively, {\f1{}level-1} and {\f1{}level-0}.  The {\f1{}level-0} script also exists under the name {\f1{}weekly}, and the {\f1{}level-1} under the name {\f1{}daily}--these additional names can be changed according to your backup schedule.  , for more information on running the restoration script.  , for more information on running the backup scripts.\par
\par
{\i \pard{}Please Note:} The backup scripts and the restoration scripts are designed to be used together.  While it is possible to restore files by hand from an archive which was created using a backup script, and to create an archive by hand which could then be extracted using the restore script, it is easier to use the scripts.  .  See {\uldb Inc Dumps}{\v Inc_Dumps}, and See {\uldb Inc Dumps}{\v Inc_Dumps}, before making such an attempt.\par
\par
\page\pard Node: {\b Backup Parameters}, \keepn Next: {\uldb Scripted Backups}{\v Scripted_Backups}, Prev: {\uldb Backup Levels}{\v Backup_Levels}, Up: {\uldb Backups}{\v Backups}\line
K{\footnote K Backup Parameters}
#{\footnote Backup_Parameters}
${\footnote \pard{}Setting Parameters for Backups and Restoration}\par
\pard{\fs24\b Setting Parameters for Backups and Restoration}\par
\par
{{{\i \pard\li720{}(This message will disappear, once this node revised.)}\par
\pard{}}}\par
\pard{}The file {\f1{}backup-specs} specifies backup parameters for the backup and restoration scripts provided with {\f1{}tar}.  You must edit {\f1{}backup-specs} to fit your system configuration and schedule before using these scripts.\par
\par
\pard{}, for an explanation of this syntax.\par
\par
{\pard{}{\f1{}ADMINISTRATOR}\par
\pard\li720{}The user name of the backup administrator.\par
\par
\pard{}{\f1{}BACKUP_HOUR}\par
\pard\li720{}The hour at which the backups are done.  This can be a number from 0 to 23, or the string {\f1{}now}.\par
\par
\pard{}{\f1{}TAPE_FILE}\par
\pard\li720{}The device {\f1{}tar} writes the archive to.  This device should be attached to the host on which the dump scripts are run.\par
\par
\pard{}{\f1{}TAPE_STATUS}\par
\pard\li720{}The command to use to obtain the status of the archive device, including error count.  On some tape drives there may not be such a command; in that case, simply use `TAPE_STATUS=false'.\par
\par
\pard{}{\f1{}BLOCKING}\par
\pard\li720{}The blocking factor {\f1{}tar} will use when writing the dump archive.  See {\uldb Blocking Factor}{\v Blocking_Factor}.\par
\par
\pard{}{\f1{}BACKUP_DIRS}\par
\pard\li720{}A list of file systems to be dumped.  You can include any directory name in the list--subdirectories on that file system will be included, regardless of how they may look to other networked machines.  Subdirectories on other file systems will be ignored.\par
\par
\pard\li720{}The host name specifies which host to run {\f1{}tar} on, and should normally be the host that actually contains the file system.  However, the host machine must have GNU {\f1{}tar} installed, and must be able to access the directory containing the backup scripts and their support files using the same file name that is used on the machine where the scripts are run (ie. what {\f1{}pwd} will print when in that directory on that machine).  If the host that contains the file system does not have this capability, you can specify another host as long as it can access the file system through NFS.\par
\par
\pard{}{\f1{}BACKUP_FILES}\par
\pard\li720{}A list of individual files to be dumped.  These should be accessible from the machine on which the backup script is run.\par
\par
\pard{}}\par
{\par
\pard\keep\fi-2880\li2880\tx2880{}{\uldb backup-specs example}{\v backup_specs_example}\tab An Example Text of {\f1{}Backup-specs}\par
{\uldb Script Syntax}{\v Script_Syntax}\tab Syntax for {\f1{}Backup-specs}\par
\pard{}}\par
\page\pard Node: {\b backup-specs example}, \keepn Next: {\uldb Script Syntax}{\v Script_Syntax}, Prev: {\uldb Backup Parameters}{\v Backup_Parameters}, Up: {\uldb Backup Parameters}{\v Backup_Parameters}\line
K{\footnote K backup-specs example}
#{\footnote backup_specs_example}
${\footnote \pard{}An Example Text of {\f1{}Backup-specs}}\par
\pard{\fs24\b An Example Text of {\f1{}Backup-specs}}\par
\par
{{{\i \pard\li720{}(This message will disappear, once this node revised.)}\par
\pard{}}}\par
\pard{}The following is the text of {\f1{}backup-specs} as it appears at FSF:\par
\par
{\pard\keep\li720\f1{}# site-specific parameters for file system backup.\line
\line
ADMINISTRATOR=friedman\line
BACKUP_HOUR=1\line
TAPE_FILE=/dev/nrsmt0\line
TAPE_STATUS="mts -t $TAPE_FILE"\line
BLOCKING=124\line
BACKUP_DIRS="\line
	albert:/fs/fsf\line
	apple-gunkies:/gd\line
	albert:/fs/gd2\line
	albert:/fs/gp\line
	geech:/usr/jla\line
	churchy:/usr/roland\line
	albert:/\line
	albert:/usr\line
	apple-gunkies:/\line
	apple-gunkies:/usr\line
	gnu:/hack\line
	gnu:/u\line
	apple-gunkies:/com/mailer/gnu\line
	apple-gunkies:/com/archive/gnu"\line
\line
BACKUP_FILES="/com/mailer/aliases /com/mailer/league*[a-z]"\line
\par
\pard\f0{}}\par
\page\pard Node: {\b Script Syntax}, \keepn Next: {\uldb }{\v }, Prev: {\uldb backup-specs example}{\v backup_specs_example}, Up: {\uldb Backup Parameters}{\v Backup_Parameters}\line
K{\footnote K Script Syntax}
#{\footnote Script_Syntax}
${\footnote \pard{}Syntax for {\f1{}Backup-specs}}\par
\pard{\fs24\b Syntax for {\f1{}Backup-specs}}\par
\par
{{{\i \pard\li720{}(This message will disappear, once this node revised.)}\par
\pard{}}}\par
{\f1{}\pard{}backup-specs} is in shell script syntax.  The following conventions should be considered when editing the script:\par
\par
\pard{}A quoted string is considered to be contiguous, even if it is on more than one line.  Therefore, you cannot include commented-out lines within a multi-line quoted string.  BACKUP_FILES and BACKUP_DIRS are the two most likely parameters to be multi-line.\par
\par
\pard{}A quoted string typically cannot contain wildcards.  In {\f1{}backup-specs}, however, the parameters BACKUP_DIRS and BACKUP_FILES can contain wildcards.\par
\par
\page\pard Node: {\b Scripted Backups}, \keepn Next: {\uldb Scripted Restoration}{\v Scripted_Restoration}, Prev: {\uldb Backup Parameters}{\v Backup_Parameters}, Up: {\uldb Backups}{\v Backups}\line
K{\footnote K Scripted Backups}
#{\footnote Scripted_Backups}
${\footnote \pard{}Using the Backup Scripts}\par
\pard{\fs24\b Using the Backup Scripts}\par
\par
{{{\i \pard\li720{}(This message will disappear, once this node revised.)}\par
\pard{}}}\par
\pard{}The syntax for running a backup script is:\par
\par
{{\f1{}\pard\keep\li720\f1{}script-name} [{\i time-to-be-run}]\par
\pard\f0{}}\par
\pard{}where {\i time-to-be-run} can be a specific system time, or can be {\f1{}now}.  If you do not specify a time, the script runs at the time specified in {\f1{}backup-specs} ().\par
\par
\pard{}You should start a script with a tape or disk mounted.  Once you start a script, it prompts you for new tapes or disks as it needs them.  Media volumes don't have to correspond to archive files--a multi-volume archive can be started in the middle of a tape that already contains the end of another multi-volume archive.  The {\f1{}restore} script prompts for media by its archive volume, so to avoid an error message you should keep track of which tape (or disk) contains which volume of the archive.  .  .\par
\par
\pard{}The backup scripts write two files on the file system.  The first is a record file in {\f1{}/etc/tar-backup/}, which is used by the scripts to store and retrieve information about which files were dumped.  This file is not meant to be read by humans, and should not be deleted by them.  , for a more detailed explanation of this file.\par
\par
\pard{}The second file is a log file containing the names of the file systems and files dumped, what time the backup was made, and any error messages that were generated, as well as how much space was left in the media volume after the last volume of the archive was written.  You should check this log file after every backup.  The file name is {\f1{}log-{\i mmm-ddd-yyyy}-level-1} or {\f1{}log-{\i mmm-ddd-yyyy}-full}.\par
\par
\pard{}The script also prints the name of each system being dumped to the standard output.\par
\par
\page\pard Node: {\b Scripted Restoration}, \keepn Next: {\uldb }{\v }, Prev: {\uldb Scripted Backups}{\v Scripted_Backups}, Up: {\uldb Backups}{\v Backups}\line
K{\footnote K Scripted Restoration}
#{\footnote Scripted_Restoration}
${\footnote \pard{}Using the Restore Script}\par
\pard{\fs24\b Using the Restore Script}\par
\par
{{{\i \pard\li720{}(This message will disappear, once this node revised.)}\par
\pard{}}}\par
{{{\b \pard\li720{}Warning:} The GNU {\f1{}tar} distribution does {\i not} provide any such {\f1{}restore} script yet.  This section is only listed here for documentation maintenance purposes.  In any case, all contents is subject to change as things develop.\par
\pard{}}\par
\pard{}To restore files that were archived using a scripted backup, use the {\f1{}restore} script.  The syntax for the script is:\par
\par
\pard{}where ***** are the file systems to restore from, and ***** is a regular expression which specifies which files to restore.  If you specify -all, the script restores all the files in the file system.\par
\par
\pard{}You should start the restore script with the media containing the first volume of the archive mounted.  The script will prompt for other volumes as they are needed.  If the archive is on tape, you don't need to rewind the tape to to its beginning--if the tape head is positioned past the beginning of the archive, the script will rewind the tape as needed.  , for a discussion of tape positioning.\par
\par
\pard{}If you specify {\f1{}--all} as the {\i files} argument, the {\f1{}restore} script extracts all the files in the archived file system into the active file system.\par
\par
{{\b \pard\li720{}Warning:} The script will delete files from the active file system if they were not in the file system when the archive was made.\par
\pard{}}\par
\pa\'7BNo Value For "rd\'7B\'7Dxref-incremental"\'7D, and {\uldb Inc Dumps}{\v Inc_Dumps}, for an explanation of how the script makes that determination.\par
\par
}\page\pard Node: {\b Choosing}, \keepn Next: {\uldb Date input formats}{\v Date_input_formats}, Prev: {\uldb Backups}{\v Backups}, Up: {\uldb Top}{\v Top}\line
K{\footnote K Choosing}
#{\footnote Choosing}
${\footnote \pard{}Choosing Files and Names for {\f1{}tar}}\par
\pard{\fs24\b Choosing Files and Names for {\f1{}tar}}\par
\par
{{{\i \pard\li720{}(This message will disappear, once this node revised.)}\par
\pard{}}}\par
\pard{}Certain options to {\f1{}tar} enable you to specify a name for your archive.  Other options let you decide which files to include or exclude from the archive, based on when or whether files were modified, whether the file names do or don't match specified patterns, or whether files are in specified directories.\par
\par
{\par
\pard\keep\fi-2880\li2880\tx2880{}{\uldb file}{\v file}\tab Choosing the Archive's Name\par
{\uldb Selecting Archive Members}{\v Selecting_Archive_Members}\tab \par
{\uldb files}{\v files}\tab Reading Names from a File\par
{\uldb exclude}{\v exclude}\tab Excluding Some Files\par
{\uldb Wildcards}{\v Wildcards}\tab \par
{\uldb after}{\v after}\tab Operating Only on New Files\par
{\uldb recurse}{\v recurse}\tab Descending into Directories\par
{\uldb one}{\v one}\tab Crossing Filesystem Boundaries\par
\pard{}}\par
\page\pard Node: {\b file}, \keepn Next: {\uldb Selecting Archive Members}{\v Selecting_Archive_Members}, Prev: {\uldb Choosing}{\v Choosing}, Up: {\uldb Choosing}{\v Choosing}\line
K{\footnote K file}
#{\footnote file}
${\footnote \pard{}Choosing and Naming Archive Files}\par
\pard{\fs24\b Choosing and Naming Archive Files}\par
\par
\pard{}{K{\footnote K Naming an archive}}{K{\footnote K Archive Name}}{K{\footnote K Directing output}}{K{\footnote K Choosing an archive file}}{K{\footnote K Where is the archive?}}{{\par
{\i \pard\li720{}(This message will disappear, once this node revised.)}\par
\pard{}}}\par
\pard{}By default, {\f1{}tar} uses an archive file name that was compiled when it was built on the system; usually this name refers to some physical tape drive on the machine.  However, the person who installed {\f1{}tar} on the system may not set the default to a meaningful value as far as most users are concerned.  As a result, you will usually want to tell {\f1{}tar} where to find (or create) the archive.  The {\f1{}--file={\i archive-name}} ({\f1{}-f {\i archive-name}}) option allows you to either specify or name a file to use as the archive instead of the default archive file location.\par
\par
{\pard{}{\f1{}--file={\i archive-name}}\par
\pard{}{\f1{}-f {\i archive-name}}\par
\pard\li720{}Name the archive to create or operate on.  Use in conjunction with any operation.\par
\pard{}}\par
\pard{}For example, in this {\f1{}tar} command,\par
\par
{\pard\keep\li720\f1{}$ tar -cvf collection.tar blues folk jazz\par
\pard\f0{}}\par
{\f1{}\pard{}collection.tar} is the name of the archive.  It must directly follow the {\f1{}-f} option, since whatever directly follows {\f1{}-f} {\i will} end up naming the archive.  If you neglect to specify an archive name, you may end up overwriting a file in the working directory with the archive you create since {\f1{}tar} will use this file's name for the archive name.\par
\par
\pard{}An archive can be saved as a file in the file system, sent through a pipe or over a network, or written to an I/O device such as a tape, floppy disk, or CD write drive.\par
\par
\pard{}{K{\footnote K Writing new archives}}{K{\footnote K Archive creation}}If you do not name the archive, {\f1{}tar} uses the value of the environment variable {\f1{}TAPE} as the file name for the archive.  If that is not available, {\f1{}tar} uses a default, compiled-in archive name, usually that for tape unit zero (ie. {\f1{}/dev/tu00}).  {\f1{}tar} always needs an archive name.\par
\par
\pard{}If you use {\f1{}-} as an {\i archive-name}, {\f1{}tar} reads the archive from standard input (when listing or extracting files), or writes it to standard output (when creating an archive).  If you use {\f1{}-} as an {\i archive-name} when modifying an archive, {\f1{}tar} reads the original archive from its standard input and writes the entire new archive to its standard output.\par
\par
{\pard\keep\li720\f1{}$ cd sourcedir; tar -cf - . | (cd targetdir; tar -xf -)\par
\pard\f0{}}\par
\pard{}{K{\footnote K Standard input and output}}{K{\footnote K tar to standard input and output}}To specify an archive file on a device attached to a remote machine, use the following:\par
\par
{\pard\keep\li720\f1{}--file={\i hostname}:/{\i dev}/{\i file name}\par
\pard\f0{}}\par
{\f1{}\pard{}tar} will complete the remote connection, if possible, and prompt you for a username and password.  If you use {\f1{}--file=@{\i hostname}:/{\i dev}/{\i file name}}, {\f1{}tar} will complete the remote connection, if possible, using your username as the username on the remote machine.\par
\par
\pard{}If the archive file name includes a colon ({\f1{}:}), then it is assumed to be a file on another machine.  If the archive file is {\f1{}{\i user}@{\i host}:{\i file}}, then {\i file} is used on the host {\i host}.  The remote host is accessed using the {\f1{}rsh} program, with a username of {\i user}.  If the username is omitted (along with the {\f1{}@} sign), then your user name will be used.  (This is the normal {\f1{}rsh} behavior.)  It is necessary for the remote machine, in addition to permitting your {\f1{}rsh} access, to have the {\f1{}/usr/ucb/rmt} program installed.  If you need to use a file whose name includes a colon, then the remote tape drive behavior can be inhibited by using the {\f1{}--force-local} option.\par
\par
\pard{}When the archive is being created to {\f1{}/dev/null}, GNU {\f1{}tar} tries to minimize input and output operations.  The Amanda backup system, when used with GNU {\f1{}tar}, has an initial sizing pass which uses this feature.\par
\par
\page\pard Node: {\b Selecting Archive Members}, \keepn Next: {\uldb files}{\v files}, Prev: {\uldb file}{\v file}, Up: {\uldb Choosing}{\v Choosing}\line
K{\footnote K Selecting Archive Members}
#{\footnote Selecting_Archive_Members}
${\footnote \pard{}Selecting Archive Members}\par
\pard{\fs24\b Selecting Archive Members}\par
\par
\pard{}{K{\footnote K Specifying files to act on}}{K{\footnote K Specifying archive members}} \'A2File Name arguments\'A2 specify which files in the file system {\f1{}tar} operates on, when creating or adding to an archive, or which archive members {\f1{}tar} operates on, when reading or deleting from an archive.  See {\uldb Operations}{\v Operations}.\par
\par
\pard{}To specify file names, you can include them as the last arguments on the command line, as follows: {\par
\pard\keep\li720\f1{}tar {\i operation} [{\i option1} {\i option2} ...] [{\i file name-1} {\i file name-2} ...]\par
\pard\f0{}}\par
\pard{}If you specify a directory name as a file name argument, all the files in that directory are operated on by {\f1{}tar}.\par
\par
\pard{}If you do not specify files when {\f1{}tar} is invoked with {\f1{}--create} ({\f1{}-c}), {\f1{}tar} operates on all the non-directory files in the working directory.  If you specify either {\f1{}--list} ({\f1{}-t}) or {\f1{}--extract} ({\f1{}--get}, {\f1{}-x}), {\f1{}tar} operates on all the archive members in the archive.  If you specify any operation other than one of these three, {\f1{}tar} does nothing.\par
\par
\pard{}By default, {\f1{}tar} takes file names from the command line.  However, there are other ways to specify file or member names, or to modify the manner in which {\f1{}tar} selects the files or members upon which to operate; .  In general, these methods work both for specifying the names of files and archive members.\par
\par
\page\pard Node: {\b files}, \keepn Next: {\uldb exclude}{\v exclude}, Prev: {\uldb Selecting Archive Members}{\v Selecting_Archive_Members}, Up: {\uldb Choosing}{\v Choosing}\line
K{\footnote K files}
#{\footnote files}
${\footnote \pard{}Reading Names from a File}\par
\pard{\fs24\b Reading Names from a File}\par
\par
{{{\i \pard\li720{}(This message will disappear, once this node revised.)}\par
\pard{}}}\par
\pard{}{K{\footnote K Reading file names from a file}}{K{\footnote K Lists of file names}}{K{\footnote K File Name arguments, alternatives}}Instead of giving the names of files or archive members on the command line, you can put the names into a file, and then use the {\f1{}--files-from={\i file-of-names}} ({\f1{}-T {\i file-of-names}}) option to {\f1{}tar}.  Give the name of the file which contains the list of files to include as the argument to {\f1{}--files-from}.  In the list, the file names should be separated by newlines.  You will frequently use this option when you have generated the list of files to archive with the {\f1{}find} utility.\par
\par
{\pard{}{\f1{}--files-from={\i file name}}\par
\pard{}{\f1{}-T {\i file name}}\par
\pard\li720{}Get names to extract or create from file {\i file name}.\par
\pard{}}\par
\pard{}If you give a single dash as a file name for {\f1{}--files-from}, (i.e., you specify either {\f1{}--files-from=-} or {\f1{}-T -}), then the file names are read from standard input.\par
\par
\pard{}Unless you are running {\f1{}tar} with {\f1{}--create}, you can not use both {\f1{}--files-from=-} and {\f1{}--file=-} ({\f1{}-f -}) in the same command.\par
\par
\pard{}The following example shows how to use {\f1{}find} to generate a list of files smaller than 400K in length and put that list into a file called {\f1{}small-files}.  You can then use the {\f1{}-T} option to {\f1{}tar} to specify the files from that file, {\f1{}small-files}, to create the archive {\f1{}little.tgz}.  (The {\f1{}-z} option to {\f1{}tar} compresses the archive with {\f1{}gzip}; see {\uldb gzip}{\v gzip} for more information.)\par
\par
{\pard\keep\li720\f1{}$ find . -size -400 -print > small-files\line
$ tar -c -v -z -T small-files -f little.tgz\par
\pard\f0{}}\par
{\par
\pard\keep\fi-2880\li2880\tx2880{}{\uldb nul}{\v nul}\tab\par
\pard{}}\par
\page\pard Node: {\b nul}, \keepn Next: {\uldb }{\v }, Prev: {\uldb files}{\v files}, Up: {\uldb files}{\v files}\line
K{\footnote K nul}
#{\footnote nul}
{${\footnote {\f1{}\pard{}NUL} Terminated File Names}\par
\pard{\fs24\b {\f1{}NUL} Terminated File Names}\par
\par
}\pard{}{K{\footnote K File names, terminated by {\f1{}NUL}}}{K{\footnote K {\f1{}NUL} terminated file names}}The {\f1{}--null} option causes {\f1{}--files-from={\i file-of-names}} ({\f1{}-T {\i file-of-names}}) to read file names terminated by a {\f1{}NUL} instead of a newline, so files whose names contain newlines can be archived using {\f1{}--files-from}.\par
\par
{\pard{}{\f1{}--null}\par
\pard\li720{}Only consider {\f1{}NUL} terminated file names, instead of files that terminate in a newline.\par
\pard{}}\par
\pard{}The {\f1{}--null} option is just like the one in GNU {\f1{}xargs} and {\f1{}cpio}, and is useful with the {\f1{}-print0} predicate of GNU {\f1{}find}.  In {\f1{}tar}, {\f1{}--null} also causes {\f1{}--directory={\i directory}} ({\f1{}-C {\i directory}}) options to be treated as file names to archive, in case there are any files out there called {\f1{}-C}.\par
\par
\pard{}This example shows how to use {\f1{}find} to generate a list of files larger than 800K in length and put that list into a file called {\f1{}long-files}.  The {\f1{}-print0} option to {\f1{}find} just just like {\f1{}-print}, except that it separates files with a {\f1{}NUL} rather than with a newline.  You can then run {\f1{}tar} with both the {\f1{}--null} and {\f1{}-T} options to specify that {\f1{}tar} get the files from that file, {\f1{}long-files}, to create the archive {\f1{}big.tgz}.  The {\f1{}--null} option to {\f1{}tar} will cause {\f1{}tar} to recognize the {\f1{}NUL} separator between files.\par
\par
{\pard\keep\li720\f1{}$ find . -size +800 -print0 > long-files\line
$ tar -c -v --null --files-from=long-files --file=big.tar\par
\pard\f0{}}\par
\page\pard Node: {\b exclude}, \keepn Next: {\uldb Wildcards}{\v Wildcards}, Prev: {\uldb files}{\v files}, Up: {\uldb Choosing}{\v Choosing}\line
K{\footnote K exclude}
#{\footnote exclude}
${\footnote \pard{}Excluding Some Files}\par
\pard{\fs24\b Excluding Some Files}\par
\par
\pard{}{K{\footnote K File names, excluding files by}}{K{\footnote K Excluding files by name and pattern}}{K{\footnote K Excluding files by file system}}{{\par
{\i \pard\li720{}(This message will disappear, once this node revised.)}\par
\pard{}}}\par
\pard{}To avoid operating on files whose names match a particular pattern, use the {\f1{}--exclude={\i pattern}} or {\f1{}--exclude-from={\i file-of-patterns}} ({\f1{}-X {\i file-of-patterns}}) options.\par
\par
{\pard{}{\f1{}--exclude={\i pattern}}\par
\pard\li720{}Causes {\f1{}tar} to ignore files that match the {\i pattern}.\par
\pard{}}\par
\pard{}{K{\footnote K exclude}}The {\f1{}--exclude={\i pattern}} option will prevent any file or member which matches the shell wildcards ({\i pattern}) from being operated on ({\i pattern} can be a single file name or a more complex expression).  For example, if you want to create an archive with all the contents of {\f1{}/tmp} except the file {\f1{}/tmp/foo}, you can use the command {\f1{}tar --create --file=arch.tar --exclude=foo}.  You may give multiple {\f1{}--exclude} options.\par
\par
{\pard{}{\f1{}--exclude-from={\i file}}\par
\pard{}{\f1{}-X {\i file}}\par
\pard\li720{}Causes {\f1{}tar} to ignore files that match the patterns listed in {\i file}.\par
\pard{}}\par
\pard{}{K{\footnote K exclude-from}}Use the {\f1{}--exclude-from={\i file-of-patterns}} option to read a list of shell wildcards, one per line, from {\i file}; {\f1{}tar} will ignore files matching those regular expressions.  Thus if {\f1{}tar} is called as {\f1{}tar -c -X foo .} and the file {\f1{}foo} contains a single line {\f1{}*.o}, no files whose names end in {\f1{}.o} will be added to the archive.\par
\par
{\par
\pard\keep\fi-2880\li2880\tx2880{}{\uldb problems with exclude}{\v problems_with_exclude}\tab\par
\pard{}}\par
\page\pard Node: {\b problems with exclude}, \keepn Next: {\uldb }{\v }, Prev: {\uldb exclude}{\v exclude}, Up: {\uldb exclude}{\v exclude}\line
K{\footnote K problems with exclude}
#{\footnote problems_with_exclude}
${\footnote \pard{}Problems with Using the {\f1{}exclude} Options}\par
\pard{\fs24\b Problems with Using the {\f1{}exclude} Options}\par
\par
\pard{}Some users find {\f1{}exclude} options confusing.  Here are some common pitfalls:\par
\par
{\pard\fi-720\li720\tx144\tx720{}\tab{}{\f2\'B7}\tab{}The main operating mode of {\f1{}tar} will always act on file names listed on the command line, no matter whether or not there is an exclusion which would otherwise affect them.  In the example above, if you create an archive and exclude files that end with {\f1{}*.o}, but explicitly name the file {\f1{}catc.o} after all the options have been listed, {\f1{}catc.o} {\i will} be included in the archive.\par
\par
\pard\fi-720\li720\tx144\tx720{}\tab{}{\f2\'B7}\tab{}You can sometimes confuse the meanings of {\f1{}--exclude={\i pattern}} and {\f1{}--exclude-from={\i file-of-patterns}} ({\f1{}-X {\i file-of-patterns}}).  Be careful: use {\f1{}--exclude={\i pattern}} when files to be excluded are given as a pattern on the command line.  Use {\f1{}--exclude-from={\i file-of-patterns}} to introduce the name of a file which contains a list of patterns, one per line; each of these patterns can exclude zero, one, or many files.\par
\par
\pard\fi-720\li720\tx144\tx720{}\tab{}{\f2\'B7}\tab{}When you use {\f1{}--exclude={\i pattern}}, be sure to quote the {\i pattern} parameter, so GNU {\f1{}tar} sees wildcard characters like {\f1{}*}.  If you do not do this, the shell might expand the {\f1{}*} itself using files at hand, so {\f1{}tar} might receive a list of files instead of one pattern, or none at all, making the command somewhat illegal.  This might not correspond to what you want.\par
\par
\pard\li720{}For example, write:\par
\par
{\pard\keep\li1440\f1{}$ tar -c -f {\i archive.tar} -X '*/tmp/*' {\i directory}\par
\pard\li720\f0{}}\par
\pard\li720{}rather than:\par
\par
{\pard\keep\li1440\f1{}$ tar -c -f {\i archive.tar} -X */tmp/* {\i directory}\par
\pard\li720\f0{}}\par
\pard\fi-720\li720\tx144\tx720{}\tab{}{\f2\'B7}\tab{}You must use use shell syntax, or globbing, rather than {\f1{}regexp} syntax, when using exclude options in {\f1{}tar}.  If you try to use {\f1{}regexp} syntax to describe files to be excluded, your command might fail.\par
\par
\pard\fi-720\li720\tx144\tx720{}\tab{}{\f2\'B7}\tab{}In earlier versions of {\f1{}tar}, what is now the {\f1{}--exclude-from={\i file-of-patterns}} option was called {\f1{}--exclude-{\i pattern}} instead.  Now, {\f1{}--exclude={\i pattern}} applies to patterns listed on the command line and {\f1{}--exclude-from={\i file-of-patterns}} applies to patterns listed in a file.\par
\par
\pard{}}\par
\page\pard Node: {\b Wildcards}, \keepn Next: {\uldb after}{\v after}, Prev: {\uldb exclude}{\v exclude}, Up: {\uldb Choosing}{\v Choosing}\line
K{\footnote K Wildcards}
#{\footnote Wildcards}
${\footnote \pard{}Wildcards Patterns and Matching}\par
\pard{\fs24\b Wildcards Patterns and Matching}\par
\par
\pard{}\'A2Globbing\'A2 is the operation by which \'A2wildcard\'A2 characters, {\f1{}*} or {\f1{}?} for example, are replaced and expanded into all existing files matching the given pattern.  However, {\f1{}tar} often uses wildcard patterns for matching (or globbing) archive members instead of actual files in the filesystem.  Wildcard patterns are also used for verifying volume labels of {\f1{}tar} archives.  This section has the purpose of explaining wildcard syntax for {\f1{}tar}.\par
\par
\pard{}A {\i pattern} should be written according to shell syntax, using wildcard characters to effect globbing.  Most characters in the pattern stand for themselves in the matched string, and case is significant: {\f1{}a} will match only {\f1{}a}, and not {\f1{}A}.  The character {\f1{}?} in the pattern matches any single character in the matched string.  The character {\f1{}*} in the pattern matches zero, one, or more single characters in the matched string.  The character {\f1{}\'5C} says to take the following character of the pattern {\i literally}; it is useful when one needs to match the {\f1{}?}, {\f1{}*}, {\f1{}[} or {\f1{}\'5C} characters, themselves.\par
\par
\pard{}The character {\f1{}[}, up to the matching {\f1{}]}, introduces a character class.  A \'A2character class\'A2 is a list of acceptable characters for the next single character of the matched string.  For example, {\f1{}[abcde]} would match any of the first five letters of the alphabet.  Note that within a character class, all of the "special characters" listed above other than {\f1{}\'5C} lose their special meaning; for example, {\f1{}[-\'5C\'5C[*?]]} would match any of the characters, {\f1{}-}, {\f1{}\'5C}, {\f1{}[}, {\f1{}*}, {\f1{}?}, or {\f1{}]}.  (Due to parsing constraints, the characters {\f1{}-} and {\f1{}]} must either come {\i first} or {\i last} in a character class.)\par
\par
\pard{}{K{\footnote K Excluding characters from a character class}}{K{\footnote K Character class, excluding characters from}}If the first character of the class after the opening {\f1{}[} is {\f1{}!} or {\f1{}^}, then the meaning of the class is reversed.  Rather than listing character to match, it lists those characters which are {\i forbidden} as the next single character of the matched string.\par
\par
\pard{}Other characters of the class stand for themselves.  The special construction {\f1{}[{\i a}-{\i e}]}, using an hyphen between two letters, is meant to represent all characters between {\i a} and {\i e}, inclusive.\par
\par
\pard{}Periods ({\f1{}.}) or forward slashes ({\f1{}/}) are not considered special for wildcard matches.  However, if a pattern completely matches a directory prefix of a matched string, then it matches the full matched string: excluding a directory also excludes all the files beneath it.\par
\par
\pard{}There are some discussions floating in the air and asking for modifications in the way GNU {\f1{}tar} accomplishes wildcard matches.  We perceive any change of semantics in this area as a delicate thing to impose on GNU {\f1{}tar} users.  On the other hand, the GNU project should be progressive enough to correct any ill design: compatibility at all price is not always a good attitude.  In conclusion, it is {\i possible} that slight amendments be later brought to the previous description.  Your opinions on the matter are welcome.\par
\par
\page\pard Node: {\b after}, \keepn Next: {\uldb recurse}{\v recurse}, Prev: {\uldb Wildcards}{\v Wildcards}, Up: {\uldb Choosing}{\v Choosing}\line
K{\footnote K after}
#{\footnote after}
${\footnote \pard{}Operating Only on New Files}\par
\pard{\fs24\b Operating Only on New Files}\par
\par
\pard{}{K{\footnote K Excluding file by age}}{K{\footnote K Modification time, excluding files by}}{K{\footnote K Age, excluding files by}}{{\par
{\i \pard\li720{}(This message will disappear, once this node revised.)}\par
\pard{}}}\par
\pard{}The {\f1{}--after-date={\i date}} ({\f1{}--newer={\i date}}, {\f1{}-N {\i date}}) option causes {\f1{}tar} to only work on files whose modification or inode-changed times are newer than the {\i date} given.  If you use this option when creating or appending to an archive, the archive will only include new files.  If you use {\f1{}--after-date} when extracting an archive, {\f1{}tar} will only extract files newer than the {\i date} you specify.\par
\par
\pard{}If you only want {\f1{}tar} to make the date comparison based on modification of the actual contents of the file (rather than inode changes), then use the {\f1{}--newer-mtime={\i date}} option.\par
\par
\pard{}You may use these options with any operation.  Note that these options differ from the {\f1{}--update} ({\f1{}-u}) operation in that they allow you to specify a particular date against which {\f1{}tar} can compare when deciding whether or not to archive the files.\par
\par
{\pard{}{\f1{}--after-date={\i date}}\par
\pard{}{\f1{}--newer={\i date}}\par
\pard{}{\f1{}-N {\i date}}\par
\pard\li720{}Only store files newer than {\i date}.\par
\par
\pard\li720{}Acts on files only if their modification or inode-changed times are later than {\i date}.  Use in conjunction with any operation.\par
\par
\pard{}{\f1{}--newer-mtime={\i date}}\par
\pard\li720{}Acts like {\f1{}--after-date={\i date}} ({\f1{}--newer={\i date}}, {\f1{}-N {\i date}}), but only looks at modification times.\par
\pard{}}\par
\pard{}These options limit {\f1{}tar} to only operating on files which have been modified after the date specified.  A file is considered to have changed if the contents have been modified, or if the owner, permissions, and so forth, have been changed.  (For more information on how to specify a date, see {\uldb Date input formats}{\v Date_input_formats}; remember that the entire date argument must be quoted if it contains any spaces.)\par
\par
\pard{}Gurus would say that {\f1{}--after-date={\i date}} ({\f1{}--newer={\i date}}, {\f1{}-N {\i date}}) tests both the {\f1{}mtime} (time the contents of the file were last modified) and {\f1{}ctime} (time the file's status was last changed: owner, permissions, etc) fields, while {\f1{}--newer-mtime={\i date}} tests only {\f1{}mtime} field.\par
\par
\pard{}To be precise, {\f1{}--after-date={\i date}} ({\f1{}--newer={\i date}}, {\f1{}-N {\i date}}) checks {\i both} {\f1{}mtime} and {\f1{}ctime} and processes the file if either one is more recent than {\i date}, while {\f1{}--newer-mtime={\i date}} only checks {\f1{}mtime} and disregards {\f1{}ctime}.  Neither uses {\f1{}atime} (the last time the contents of the file were looked at).\par
\par
\pard{}Date specifiers can have embedded spaces.  Because of this, you may need to quote date arguments to keep the shell from parsing them as separate arguments.\par
\par
{{\b \pard\li720{}Please Note:} {\f1{}--after-date={\i date}} ({\f1{}--newer={\i date}}, {\f1{}-N {\i date}}) and {\f1{}--newer-mtime={\i date}} should not be used for incremental backups.  Some files (such as those in renamed directories) are not selected properly by these options.  See {\uldb incremental and listed-incremental}{\v incremental_and_listed_incremental}.\par
\pard{}}\par
\pard{}To select files newer than the modification time of a file that already exists, you can use the {\f1{}--reference} ({\f1{}-r}) option of GNU {\f1{}date}, available in GNU shell utilities 1.13 or later.  It returns the timestamp of that already existing file; this timestamp expands to become the referent date which {\f1{}--newer} uses to determine which files to archive.  For example, you could say,\par
\par
{\pard\keep\li720\f1{}$ tar -cf {\i archive.tar} --newer="`date -r {\i file}`" /home\par
\pard\f0{}}\par
\pard{}which tells .\par
\par
\page\pard Node: {\b recurse}, \keepn Next: {\uldb one}{\v one}, Prev: {\uldb after}{\v after}, Up: {\uldb Choosing}{\v Choosing}\line
K{\footnote K recurse}
#{\footnote recurse}
${\footnote \pard{}Descending into Directories}\par
\pard{\fs24\b Descending into Directories}\par
\par
\pard{}{K{\footnote K Avoiding recursion in directories}}{K{\footnote K Descending directories, avoiding}}{K{\footnote K Directories, avoiding recursion}}{K{\footnote K Recursion in directories, avoiding}}{{\par
{\i \pard\li720{}(This message will disappear, once this node revised.)}\par
\pard{}}}\par
\pard{}Usually, {\f1{}tar} will recursively explore all directories (either those given on the command line or through the {\f1{}--files-from={\i file-of-names}} ({\f1{}-T {\i file-of-names}}) option) for the various files they contain.  However, you may not always want {\f1{}tar} to act this way.\par
\par
\pard{}The {\f1{}--no-recursion} option inhibits {\f1{}tar}'s recursive descent into specified directories.  If you specify {\f1{}--no-recursion}, you can use the {\f1{}find} utility for hunting through levels of directories to construct a list of file names which you could then pass to {\f1{}tar}.  {\f1{}find} allows you to be more selective when choosing which files to archive; see {\uldb files}{\v files} for more information on using {\f1{}find} with {\f1{}tar}, or look.\par
\par
{\pard{}{\f1{}--no-recursion}\par
\pard\li720{}Prevents {\f1{}tar} from recursively descending directories.\par
\pard{}}\par
\pard{}When you use {\f1{}--no-recursion}, GNU {\f1{}tar} grabs directory entries themselves, but does not descend on them recursively.  Many people use {\f1{}find} for locating files they want to back up, and since {\f1{}tar} {\i usually} recursively descends on directories, they have to use the {\f1{}! -d} option to {\f1{}find}  as they usually do not want all the files in a directory.  They then use the \'7BNo Value For "op-file-from"\'7D option to archive the files located via {\f1{}find}.\par
\par
\pard{}The problem when restoring files archived in this manner is that the directories themselves are not in the archive; so the {\f1{}--same-permissions} ({\f1{}--preserve-permissions}, {\f1{}-p}) option does not affect them--while users might really like it to.  Specifying {\f1{}--no-recursion} is a way to tell {\f1{}tar} to grab only the directory entries given to it, adding no new files on its own.\par
\par
\page\pard Node: {\b one}, \keepn Next: {\uldb }{\v }, Prev: {\uldb recurse}{\v recurse}, Up: {\uldb Choosing}{\v Choosing}\line
K{\footnote K one}
#{\footnote one}
${\footnote \pard{}Crossing Filesystem Boundaries}\par
\pard{\fs24\b Crossing Filesystem Boundaries}\par
\par
\pard{}{K{\footnote K File system boundaries, not crossing}}{{\par
{\i \pard\li720{}(This message will disappear, once this node revised.)}\par
\pard{}}}\par
{\f1{}\pard{}tar} will normally automatically cross file system boundaries in order to archive files which are part of a directory tree.  You can change this behavior by running {\f1{}tar} and specifying {\f1{}--one-file-system} ({\f1{}-l}).  This option only affects files that are archived because they are in a directory that is being archived; {\f1{}tar} will still archive files explicitly named on the command line or through {\f1{}--files-from={\i file-of-names}} ({\f1{}-T {\i file-of-names}}), regardless of where they reside.\par
\par
{\pard{}{\f1{}--one-file-system}\par
\pard{}{\f1{}-l}\par
\pard\li720{}Prevents {\f1{}tar} from crossing file system boundaries when archiving.  Use in conjunction with any write operation.\par
\pard{}}\par
\pard{}The {\f1{}--one-file-system} option causes {\f1{}tar} to modify its normal behavior in archiving the contents of directories.  If a file in a directory is not on the same filesystem as the directory itself, then {\f1{}tar} will not archive that file.  If the file is a directory itself, {\f1{}tar} will not archive anything beneath it; in other words, {\f1{}tar} will not cross mount points.\par
\par
\pard{}It is reported that using this option, the mount point is is archived, but nothing under it.\par
\par
\pard{}This option is useful for making full or incremental archival backups of a file system.  If this option is used in conjunction with {\f1{}--verbose} ({\f1{}-v}), files that are excluded are mentioned by name on the standard error.\par
\par
{\par
\pard\keep\fi-2880\li2880\tx2880{}{\uldb directory}{\v directory}\tab Changing Directory\par
{\uldb absolute}{\v absolute}\tab Absolute File Names\par
\pard{}}\par
\page\pard Node: {\b directory}, \keepn Next: {\uldb absolute}{\v absolute}, Prev: {\uldb one}{\v one}, Up: {\uldb one}{\v one}\line
K{\footnote K directory}
#{\footnote directory}
${\footnote \pard{}Changing the Working Directory}\par
\pard{\fs24\b Changing the Working Directory}\par
\par
\pard{}{K{\footnote K Changing directory mid-stream}}{K{\footnote K Directory, changing mid-stream}}{K{\footnote K Working directory, specifying}}{{\par
{\i \pard\li720{}(This message will disappear, once this node revised.)}\par
\pard{}}}\par
\pard{}To change the working directory in the middle of a list of file names, either on the command line or in a file specified using {\f1{}--files-from={\i file-of-names}} ({\f1{}-T {\i file-of-names}}), use {\f1{}--directory={\i directory}} ({\f1{}-C {\i directory}}).  This will change the working directory to the directory {\i directory} after that point in the list.\par
\par
{\pard{}{\f1{}--directory={\i directory}}\par
\pard{}{\f1{}-C {\i directory}}\par
\pard\li720{}Changes the working directory in the middle of a command line.\par
\pard{}}\par
\pard{}For example,\par
\par
{\pard\keep\li720\f1{}$ tar -c -f jams.tar grape prune -C food cherry\par
\pard\f0{}}\par
\pard{}will place the files {\f1{}grape} and {\f1{}prune} from the current directory into the archive {\f1{}jams.tar}, followed by the file {\f1{}cherry} from the directory {\f1{}food}.  This option is especially useful when you have several widely separated files that you want to store in the same archive.\par
\par
\pard{}Note that the file {\f1{}cherry} is recorded in the archive under the precise name {\f1{}cherry}, {\i not} {\f1{}food/cherry}.  Thus, the archive will contain three files that all appear to have come from the same directory; if the archive is extracted with plain {\f1{}tar --extract}, all three files will be written in the current directory.\par
\par
\pard{}Contrast this with the command,\par
\par
{\pard\keep\li720\f1{}$ tar -c -f jams.tar grape prune -C food red/cherry\par
\pard\f0{}}\par
\pard{}which records the third file in the archive under the name {\f1{}red/cherry} so that, if the archive is extracted using {\f1{}tar --extract}, the third file will be written in a subdirectory named {\f1{}orange-colored}.\par
\par
\pard{}You can use the {\f1{}--directory} option to make the archive independent of the original name of the directory holding the files.  The following command places the files {\f1{}/etc/passwd}, {\f1{}/etc/hosts}, and {\f1{}/lib/libc.a} into the archive {\f1{}foo.tar}:\par
\par
{\pard\keep\li720\f1{}$ tar -c -f foo.tar -C /etc passwd hosts -C /lib libc.a\par
\pard\f0{}}\par
\pard{}However, the names of the archive members will be exactly what they were on the command line: {\f1{}passwd}, {\f1{}hosts}, and {\f1{}libc.a}.  They will not appear to be related by file name to the original directories where those files were located.\par
\par
\pard{}Note that {\f1{}--directory} options are interpreted consecutively.  If {\f1{}--directory} specifies a relative file name, it is interpreted relative to the then current directory, which might not be the same as the original current working directory of {\f1{}tar}, due to a previous {\f1{}--directory} option.\par
\par
\pard{}When using {\f1{}--files-from} (see {\uldb files}{\v files}), you can put {\f1{}-C} options in the file list.  Unfortunately, you cannot put {\f1{}--directory} options in the file list.  (This interpretation can be disabled by using the {\f1{}--null} option.)\par
\par
\page\pard Node: {\b absolute}, \keepn Next: {\uldb }{\v }, Prev: {\uldb directory}{\v directory}, Up: {\uldb one}{\v one}\line
K{\footnote K absolute}
#{\footnote absolute}
${\footnote \pard{}Absolute File Names}\par
\pard{\fs24\b Absolute File Names}\par
\par
{{{\i \pard\li720{}(This message will disappear, once this node revised.)}\par
\pard{}}}\par
{\pard{}{\f1{}-P}\par
\pard{}{\f1{}--absolute-names}\par
\pard\li720{}Do not strip leading slashes from file names.\par
\pard{}}\par
\pard{}By default, GNU {\f1{}tar} drops a leading {\f1{}/} on input or output.  This option turns off this behavior; it is equivalent to changing to the root directory before running {\f1{}tar} (except it also turns off the usual warning message).\par
\par
\pard{}When {\f1{}tar} extracts archive members from an archive, it strips any leading slashes ({\f1{}/}) from the member name.  This causes absolute member names in the archive to be treated as relative file names.  This allows you to have such members extracted wherever you want, instead of being restricted to extracting the member in the exact directory named in the archive.  For example, if the archive member has the name {\f1{}/etc/passwd}, {\f1{}tar} will extract it as if the name were really {\f1{}etc/passwd}.\par
\par
\pard{}Other {\f1{}tar} programs do not do this.  As a result, if you create an archive whose member names start with a slash, they will be difficult for other people with a non-GNU {\f1{}tar} program to use.  Therefore, GNU {\f1{}tar} also strips leading slashes from member names when putting members into the archive.  For example, if you ask {\f1{}tar} to add the file {\f1{}/bin/ls} to an archive, it will do so, but the member name will be {\f1{}bin/ls}.\par
\par
\pard{}If you use the {\f1{}--absolute-names} ({\f1{}-P}) option, {\f1{}tar} will do neither of these transformations.\par
\par
\pard{}To archive or extract files relative to the root directory, specify the {\f1{}--absolute-names} ({\f1{}-P}) option.\par
\par
\pard{}Normally, {\f1{}tar} acts on files relative to the working directory--ignoring superior directory names when archiving, and ignoring leading slashes when extracting.\par
\par
\pard{}When you specify {\f1{}--absolute-names} ({\f1{}-P}), {\f1{}tar} stores file names including all superior directory names, and preserves leading slashes.  If you only invoked {\f1{}tar} from the root directory you would never need the {\f1{}--absolute-names} ({\f1{}-P}) option, but using this option may be more convenient than switching to root.\par
\par
{\pard{}{\f1{}--absolute-names}\par
\pard\li720{}Preserves full file names (inclusing superior dirctory names) when archiving files.  Preserves leading slash when extracting files.\par
\par
\pard{}}\par
{\f1{}\pard{}tar} prints out a message about removing the {\f1{}/} from file names.  This message appears once per GNU {\f1{}tar} invocation.  It represents something which ought to be told; ignoring what it means can cause very serious surprises, later.\par
\par
\pard{}Some people, nevertheless, do not want to see this message.  Wanting to play really dangerously, one may of course redirect {\f1{}tar} standard error to the sink.  For example, under {\f1{}sh}:\par
\par
{\pard\keep\li720\f1{}$ tar -c -f archive.tar /home 2> /dev/null\par
\pard\f0{}}\par
\pard{}Another solution, both nicer and simpler, would be to change to the {\f1{}/} directory first, and then avoid absolute notation.  For example:\par
\par
{\pard\keep\li720\f1{}$ (cd / && tar -c -f archive.tar home)\line
$ tar -c -f archive.tar -C  / home\par
\pard\f0{}}\par
\page\pard Node: {\b Date input formats}, \keepn Next: {\uldb Formats}{\v Formats}, Prev: {\uldb Choosing}{\v Choosing}, Up: {\uldb Top}{\v Top}\line
K{\footnote K Date input formats}
#{\footnote Date_input_formats}
${\footnote \pard{}Date input formats}\par
\pard{\fs24\b Date input formats}\par
\par
\pard{}{K{\footnote K date input formats}}{K{\footnote K getdate}} {\par
\pard\li720{}Our units of temporal measurement, from seconds on up to months, are so complicated, asymmetrical and disjunctive so as to make coherent mental reckoning in time all but impossible.  Indeed, had some tyrannical god contrived to enslave our minds to time, to make it all but impossible for us to escape subjection to sodden routines and unpleasant surprises, he could hardly have done better than handing down our present system.  It is like a set of trapezoidal building blocks, with no vertical or horizontal surfaces, like a language in which the simplest thought demands ornate constructions, useless particles and lengthy circumlocutions.  Unlike the more successful patterns of language and science, which enable us to face experience boldly or at least level-headedly, our system of temporal calculation silently and persistently encourages our terror of time.\par
\par
\pard\li720{}...  It is as though architects had to measure length in feet, width in meters and height in ells; as though basic instruction manuals demanded a knowledge of five different languages.  It is no wonder then that we often look into our own immediate past or future, last Tuesday or a week from Sunday, with feelings of helpless confusion.  ...\par
\par
\pard\li720{}-- Robert Grudin, {\i Time and the Art of Living}.\par
\pard{}}\par
\pard{}This section describes the textual date representations that GNU programs accept.  These are the strings you, as a user, can supply as arguments to the various programs.  The C interface (via the {\f1{}getdate} function) is not described here.\par
\par
\pard{}{K{\footnote K beginning of time, for Unix}}{K{\footnote K epoch, for Unix}}Although the date syntax here can represent any possible time since zero A.D., computer integers are not big enough for such a (comparatively) long time.  The earliest date semantically allowed on Unix systems is midnight, 1 January 1970 UCT.\par
\par
{\par
\pard\keep\fi-2880\li2880\tx2880{}{\uldb General date syntax}{\v General_date_syntax}\tab Common rules.\par
{\uldb Calendar date item}{\v Calendar_date_item}\tab 19 Dec 1994.\par
{\uldb Time of day item}{\v Time_of_day_item}\tab 9:20pm.\par
{\uldb Timezone item}{\v Timezone_item}\tab EST, DST, BST, UCT, AHST, ...\par
{\uldb Day of week item}{\v Day_of_week_item}\tab Monday and others.\par
{\uldb Relative item in date strings}{\v Relative_item_in_date_strings}\tab next tuesday, 2 years ago.\par
{\uldb Pure numbers in date strings}{\v Pure_numbers_in_date_strings}\tab 19931219, 1440.\par
{\uldb Authors of getdate}{\v Authors_of_getdate}\tab Bellovin, Salz, Berets, et al.\par
\pard{}}\par
\page\pard Node: {\b General date syntax}, \keepn Next: {\uldb Calendar date item}{\v Calendar_date_item}, Prev: {\uldb Date input formats}{\v Date_input_formats}, Up: {\uldb Date input formats}{\v Date_input_formats}\line
K{\footnote K General date syntax}
#{\footnote General_date_syntax}
${\footnote \pard{}General date syntax}\par
\pard{\fs24\b General date syntax}\par
\par
\pard{}{K{\footnote K general date syntax}} {K{\footnote K items in date strings}}A \'A2date\'A2 is a string, possibly empty, containing many items separated by whitespace.  The whitespace may be omitted when no ambiguity arises.  The empty string means the beginning of today (i.e., midnight).  Order of the items is immaterial.  A date string may contain many flavors of items:\par
\par
{\pard\fi-720\li720\tx144\tx720{}\tab{}{\f2\'B7}\tab{}calendar date items\par
\par
\pard\fi-720\li720\tx144\tx720{}\tab{}{\f2\'B7}\tab{}time of the day items\par
\par
\pard\fi-720\li720\tx144\tx720{}\tab{}{\f2\'B7}\tab{}time zone items\par
\par
\pard\fi-720\li720\tx144\tx720{}\tab{}{\f2\'B7}\tab{}day of the week items\par
\par
\pard\fi-720\li720\tx144\tx720{}\tab{}{\f2\'B7}\tab{}relative items\par
\par
\pard\fi-720\li720\tx144\tx720{}\tab{}{\f2\'B7}\tab{}pure numbers.\par
\pard{}}\par
\pard{}We describe each of these item types in turn, below.\par
\par
\pard{}{K{\footnote K numbers, written-out}}{K{\footnote K ordinal numbers}}{K{\footnote K first in date strings}}{K{\footnote K next in date strings}}{K{\footnote K last in date strings}}A few numbers may be written out in words in most contexts.  This is most useful for specifying day of the week items or relative items (see below).  Here is the list: {\f1{}first} for 1, {\f1{}next} for 2, {\f1{}third} for 3, {\f1{}fourth} for 4, {\f1{}fifth} for 5, {\f1{}sixth} for 6, {\f1{}seventh} for 7, {\f1{}eighth} for 8, {\f1{}ninth} for 9, {\f1{}tenth} for 10, {\f1{}eleventh} for 11 and {\f1{}twelfth} for 12.  Also, {\f1{}last} means exactly -1.\par
\par
\pard{}{K{\footnote K months, written-out}}When a month is written this way, it is still considered to be written numerically, instead of being "spelled in full"; this changes the allowed strings.\par
\par
\pard{}{K{\footnote K case, ignored in dates}}{K{\footnote K comments, in dates}}Alphabetic case is completely ignored in dates.  Comments may be introduced between round parentheses, as long as included parentheses are properly nested.  Hyphens not followed by a digit are currently ignored.  Leading zeros on numbers are ignored.\par
\par
\page\pard Node: {\b Calendar date item}, \keepn Next: {\uldb Time of day item}{\v Time_of_day_item}, Prev: {\uldb General date syntax}{\v General_date_syntax}, Up: {\uldb Date input formats}{\v Date_input_formats}\line
K{\footnote K Calendar date item}
#{\footnote Calendar_date_item}
${\footnote \pard{}Calendar date item}\par
\pard{\fs24\b Calendar date item}\par
\par
\pard{}{K{\footnote K calendar date item}} A \'A2calendar date item\'A2 specifies a day of the year.  It is specified differently, depending on whether the month is specified numerically or literally.  All these strings specify the same calendar date:\par
\par
{\pard\keep\li720\f1{}1970-09-17           # ISO 8601.\line
70-9-17              # This century assumed by default.\line
70-09-17             # Leading zeros are ignored.\line
9/17/72              # Common U.S. writing.\line
24 September 1972\line
24 Sept 72           # September has a special abbreviation.\line
24 Sep 72            # Three-letter abbreviations always allowed.\line
Sep 24, 1972\line
24-sep-72\line
24sep72\par
\pard\f0{}}\par
\pard{}The year can also be omitted.  In this case, the last specified year is used, or the current year if none.  For example:\par
\par
{\pard\keep\li720\f1{}9/17\line
sep 17\par
\pard\f0{}}\par
\pard{}Here are the rules.\par
\par
\pard{}{K{\footnote K ISO 8601 date format}}{K{\footnote K date format, ISO 8601}}For numeric months, the ISO 8601 format {\f1{}{\i year}-{\i month}-{\i day}} is allowed, where {\i year} is any positive number, {\i month} is a number between 01 and 12, and {\i day} is a number between 01 and 31.  A leading zero must be present if a number is less than ten.  If {\i year} is less than 100, then 1900 is added to it to force a date in this century.  The construct {\f1{}{\i month}/{\i day}/{\i year}}, popular in the United States, is accepted.  Also {\f1{}{\i month}/{\i day}}, omitting the year.\par
\par
\pard{}{K{\footnote K month names in date strings}}{K{\footnote K abbreviations for months}}Literal months may be spelled out in full: {\f1{}January}, {\f1{}February}, {\f1{}March}, {\f1{}April}, {\f1{}May}, {\f1{}June}, {\f1{}July}, {\f1{}August}, {\f1{}September}, {\f1{}October}, {\f1{}November} or {\f1{}December}.  Literal months may be abbreviated to their first three letters, possibly followed by an abbreviating dot.  It is also permitted to write {\f1{}Sept} instead of {\f1{}September}.\par
\par
\pard{}When months are written literally, the calendar date may be given as any of the following:\par
\par
{{\i \pard\li720\f1{}day} {\i month} {\i year}\line
{\i day} {\i month}\line
{\i month} {\i day} {\i year}\line
{\i day}-{\i month}-{\i year}\par
\pard\f0{}}\par
\pard{}Or, omitting the year:\par
\par
{{\i \pard\li720\f1{}month} {\i day}\par
\pard\f0{}}\par
\page\pard Node: {\b Time of day item}, \keepn Next: {\uldb Timezone item}{\v Timezone_item}, Prev: {\uldb Calendar date item}{\v Calendar_date_item}, Up: {\uldb Date input formats}{\v Date_input_formats}\line
K{\footnote K Time of day item}
#{\footnote Time_of_day_item}
${\footnote \pard{}Time of day item}\par
\pard{\fs24\b Time of day item}\par
\par
\pard{}{K{\footnote K time of day item}} A \'A2time of day item\'A2 in date strings specifies the time on a given day.  Here are some examples, all of which represent the same time:\par
\par
{\pard\keep\li720\f1{}20:02:0\line
20:02\line
8:02pm\line
20:02-0500      # In EST (Eastern U.S. Standard Time).\par
\pard\f0{}}\par
\pard{}More generally, the time of the day may be given as {\f1{}{\i hour}:{\i minute}:{\i second}}, where {\i hour} is a number between 0 and 23, {\i minute} is a number between 0 and 59, and {\i second} is a number between 0 and 59.  Alternatively, {\f1{}:{\i second}} can be omitted, in which case it is taken to be zero.\par
\par
\pard{}{K{\footnote K am in date strings}}{K{\footnote K pm in date strings}}{K{\footnote K midnight in date strings}}{K{\footnote K noon in date strings}}If the time is followed by {\f1{}am} or {\f1{}pm} (or {\f1{}a.m.} or {\f1{}p.m.}), {\i hour} is restricted to run from 1 to 12, and {\f1{}:{\i minute}} may be omitted (taken to be zero).  {\f1{}am} indicates the first half of the day, {\f1{}pm} indicates the second half of the day.  In this notation, 12 is the predecessor of 1: midnight is {\f1{}12am} while noon is {\f1{}12pm}.\par
\par
\pard{}{K{\footnote K timezone correction}}{K{\footnote K minutes, timezone correction by}}The time may alternatively be followed by a timezone correction, expressed as {\f1{}{\i s}{\i hh}{\i mm}}, where {\i s} is {\f1{}+} or {\f1{}-}, {\i hh} is a number of zone hours and {\i mm} is a number of zone minutes.  When a timezone correction is given this way, it forces interpretation of the time in UTC, overriding any previous specification for the timezone or the local timezone.  The {\i minute} part of the time of the day may not be elided when a timezone correction is used.  This is the only way to specify a timezone correction by fractional parts of an hour.\par
\par
\pard{}Either {\f1{}am}/{\f1{}pm} or a timezone correction may be specified, but not both.\par
\par
\page\pard Node: {\b Timezone item}, \keepn Next: {\uldb Day of week item}{\v Day_of_week_item}, Prev: {\uldb Time of day item}{\v Time_of_day_item}, Up: {\uldb Date input formats}{\v Date_input_formats}\line
K{\footnote K Timezone item}
#{\footnote Timezone_item}
${\footnote \pard{}Timezone item}\par
\pard{\fs24\b Timezone item}\par
\par
\pard{}{K{\footnote K timezone item}} A \'A2timezone item\'A2 specifies an international timezone, indicated by a small set of letters.  Any included period is ignored.  Military timezone designations use a single letter.  Currently, only integral zone hours may be represented in a timezone item.  See the previous section for a finer control over the timezone correction.\par
\par
\pard{}Here are many non-daylight-savings-time timezones, indexed by the zone hour value.\par
\par
{\pard{}+000\par
\pard\li720{}{K{\footnote K Greenwich Mean Time}}{K{\footnote K Universal Coordinated Time}}{K{\footnote K Western European Time}}{\f1{}GMT} for Greenwich Mean, {\f1{}UT} or {\f1{}UTC} for Universal (Coordinated), {\f1{}WET} for Western European and {\f1{}Z} for militaries.\par
\par
\pard{}+100\par
\pard\li720{}{K{\footnote K West African Time}}{\f1{}WAT} for West Africa and {\f1{}A} for militaries.\par
\par
\pard{}+200\par
\pard\li720{}{K{\footnote K Azores Time}}{\f1{}AT} for Azores and {\f1{}B} for militaries.\par
\par
\pard{}+300\par
{\f1{}\pard\li720{}C} for militaries.\par
\par
\pard{}+400\par
\pard\li720{}{K{\footnote K Atlantic Standard Time}}{\f1{}AST} for Atlantic Standard and {\f1{}D} for militaries.\par
\par
\pard{}+500\par
\pard\li720{}{K{\footnote K Eastern Standard Time}}{\f1{}E} for militaries and {\f1{}EST} for Eastern Standard.\par
\par
\pard{}+600\par
\pard\li720{}{K{\footnote K Central Standard Time}}{\f1{}CST} for Central Standard and {\f1{}F} for militaries.\par
\par
\pard{}+700\par
\pard\li720{}{K{\footnote K Mountain Standard Time}}{\f1{}G} for militaries and {\f1{}MST} for Mountain Standard.\par
\par
\pard{}+800\par
\pard\li720{}{K{\footnote K Pacific Standard Time}}{\f1{}H} for militaries and {\f1{}PST} for Pacific Standard.\par
\par
\pard{}+900\par
\pard\li720{}{K{\footnote K Yukon Standard Time}}{\f1{}I} for militaries and {\f1{}YST} for Yukon Standard.\par
\par
\pard{}+1000\par
\pard\li720{}{K{\footnote K Alaska-Hawaii Time}}{K{\footnote K Central Alaska Time}}{K{\footnote K Hawaii Standard Time}}{\f1{}AHST} for Alaska-Hawaii Standard, {\f1{}CAT} for Central Alaska, {\f1{}HST} for Hawaii Standard and {\f1{}K} for militaries.\par
\par
\pard{}+1100\par
\pard\li720{}{K{\footnote K Nome Standard Time}}{\f1{}L} for militaries and {\f1{}NT} for Nome.\par
\par
\pard{}+1200\par
\pard\li720{}{K{\footnote K International Date Line West}}{\f1{}IDLW} for International Date Line West and {\f1{}M} for militaries.\par
\par
\pard{}-100\par
\pard\li720{}{K{\footnote K Central European Time}}{K{\footnote K Middle European Time}}{K{\footnote K Middle European Winter Time}}{K{\footnote K French Winter Time}}{K{\footnote K Swedish Winter Time}}{\f1{}CET} for Central European, {\f1{}FWT} for French Winter, {\f1{}MET} for Middle European, {\f1{}MEWT} for Middle European Winter, {\f1{}N} for militaries and {\f1{}SWT} for Swedish Winter.\par
\par
\pard{}-200\par
\pard\li720{}{K{\footnote K Eastern European Time}}{K{\footnote K USSR Zone}}{\f1{}EET} for Eastern European, USSR Zone 1 and {\f1{}O} for militaries.\par
\par
\pard{}-300\par
\pard\li720{}{K{\footnote K Baghdad Time}}{\f1{}BT} for Baghdad, USSR Zone 2 and {\f1{}P} for militaries.\par
\par
\pard{}-400\par
{\f1{}\pard\li720{}Q} for militaries and {\f1{}ZP4} for USSR Zone 3.\par
\par
\pard{}-500\par
{\f1{}\pard\li720{}R} for militaries and {\f1{}ZP5} for USSR Zone 4.\par
\par
\pard{}-600\par
{\f1{}\pard\li720{}S} for militaries and {\f1{}ZP6} for USSR Zone 5.\par
\par
\pard{}-700\par
\pard\li720{}{K{\footnote K West Australian Standard Time}}{\f1{}T} for militaries and {\f1{}WAST} for West Australian Standard.\par
\par
\pard{}-800\par
\pard\li720{}{K{\footnote K China Coast Time}}{\f1{}CCT} for China Coast, USSR Zone 7 and {\f1{}U} for militaries.\par
\par
\pard{}-900\par
\pard\li720{}{K{\footnote K Japan Standard Time}}{\f1{}JST} for Japan Standard, USSR Zone 8 and {\f1{}V} for militaries.\par
\par
\pard{}-1000\par
\pard\li720{}{K{\footnote K East Australian Standard Time}}{K{\footnote K Guam Standard Time}}{\f1{}EAST} for East Australian Standard, {\f1{}GST} for Guam Standard, USSR Zone 9 and {\f1{}W} for militaries.\par
\par
\pard{}-1100\par
{\f1{}\pard\li720{}X} for militaries.\par
\par
\pard{}-1200\par
\pard\li720{}{K{\footnote K International Date Line East}}{K{\footnote K New Zealand Standard Time}}{\f1{}IDLE} for International Date Line East, {\f1{}NZST} for New Zealand Standard, {\f1{}NZT} for New Zealand and {\f1{}Y} for militaries.\par
\pard{}}\par
\pard{}{K{\footnote K daylight savings time}}Here are many DST timezones, indexed by the zone hour value.  Also, by following a non-DST timezone by the string {\f1{}DST} in a separate word (that is, separated by some whitespace), the corresponding DST timezone may be specified.\par
\par
{\pard{}0\par
{\f1{}\pard\li720{}BST} for British Summer.\par
\par
\pard{}+400\par
{\f1{}\pard\li720{}ADT} for Atlantic Daylight.\par
\par
\pard{}+500\par
{\f1{}\pard\li720{}EDT} for Eastern Daylight.\par
\par
\pard{}+600\par
{\f1{}\pard\li720{}CDT} for Central Daylight.\par
\par
\pard{}+700\par
{\f1{}\pard\li720{}MDT} for Mountain Daylight.\par
\par
\pard{}+800\par
{\f1{}\pard\li720{}PDT} for Pacific Daylight.\par
\par
\pard{}+900\par
{\f1{}\pard\li720{}YDT} for Yukon Daylight.\par
\par
\pard{}+1000\par
{\f1{}\pard\li720{}HDT} for Hawaii Daylight.\par
\par
\pard{}-100\par
{\f1{}\pard\li720{}MEST} for Middle European Summer, {\f1{}MESZ} for Middle European Summer, {\f1{}SST} for Swedish Summer and {\f1{}FST} for French Summer.\par
\par
\pard{}-700\par
{\f1{}\pard\li720{}WADT} for West Australian Daylight.\par
\par
\pard{}-1000\par
{\f1{}\pard\li720{}EADT} for Eastern Australian Daylight.\par
\par
\pard{}-1200\par
{\f1{}\pard\li720{}NZDT} for New Zealand Daylight.\par
\pard{}}\par
\page\pard Node: {\b Day of week item}, \keepn Next: {\uldb Relative item in date strings}{\v Relative_item_in_date_strings}, Prev: {\uldb Timezone item}{\v Timezone_item}, Up: {\uldb Date input formats}{\v Date_input_formats}\line
K{\footnote K Day of week item}
#{\footnote Day_of_week_item}
${\footnote \pard{}Day of week item}\par
\pard{\fs24\b Day of week item}\par
\par
\pard{}{K{\footnote K day of week item}} The explicit mention of a day of the week will forward the date (only if necessary) to reach that day of the week in the future.\par
\par
\pard{}Days of the week may be spelled out in full: {\f1{}Sunday}, {\f1{}Monday}, {\f1{}Tuesday}, {\f1{}Wednesday}, {\f1{}Thursday}, {\f1{}Friday} or {\f1{}Saturday}.  Days may be abbreviated to their first three letters, optionally followed by a period.  The special abbreviations {\f1{}Tues} for {\f1{}Tuesday}, {\f1{}Wednes} for {\f1{}Wednesday} and {\f1{}Thur} or {\f1{}Thurs} for {\f1{}Thursday} are also allowed.\par
\par
\pard{}{K{\footnote K next {\i day}}}{K{\footnote K last {\i day}}}A number may precede a day of the week item to move forward supplementary weeks.  It is best used in expression like {\f1{}third monday}.  In this context, {\f1{}last {\i day}} or {\f1{}next {\i day}} is also acceptable; they move one week before or after the day that {\i day} by itself would represent.\par
\par
\pard{}A comma following a day of the week item is ignored.\par
\par
\page\pard Node: {\b Relative item in date strings}, \keepn Next: {\uldb Pure numbers in date strings}{\v Pure_numbers_in_date_strings}, Prev: {\uldb Day of week item}{\v Day_of_week_item}, Up: {\uldb Date input formats}{\v Date_input_formats}\line
K{\footnote K Relative item in date strings}
#{\footnote Relative_item_in_date_strings}
${\footnote \pard{}Relative item in date strings}\par
\pard{\fs24\b Relative item in date strings}\par
\par
\pard{}{K{\footnote K relative items in date strings}}{K{\footnote K displacement of dates}} \'A2Relative items\'A2 adjust a date (or the current date if none) forward or backward.  The effects of relative items accumulate.  Here are some examples:\par
\par
{\pard\keep\li720\f1{}1 year\line
1 year ago\line
3 years\line
2 days\par
\pard\f0{}}\par
\pard{}{K{\footnote K year in date strings}}{K{\footnote K month in date strings}}{K{\footnote K fortnight in date strings}}{K{\footnote K week in date strings}}{K{\footnote K day in date strings}}{K{\footnote K hour in date strings}}{K{\footnote K minute in date strings}}The unit of time displacement may be selected by the string {\f1{}year} or {\f1{}month} for moving by whole years or months.  These are fuzzy units, as years and months are not all of equal duration.  More precise units are {\f1{}fortnight} which is worth 14 days, {\f1{}week} worth 7 days, {\f1{}day} worth 24 hours, {\f1{}hour} worth 60 minutes, {\f1{}minute} or {\f1{}min} worth 60 seconds, and {\f1{}second} or {\f1{}sec} worth one second.  An {\f1{}s} suffix on these units is accepted and ignored.\par
\par
\pard{}{K{\footnote K ago in date strings}}The unit of time may be preceded by a multiplier, given as an optionally signed number.  Unsigned numbers are taken as positively signed.  No number at all implies 1 for a multiplier.  Following a relative item by the string {\f1{}ago} is equivalent to preceding the unit by a multiplicator with value -1.\par
\par
\pard{}{K{\footnote K day in date strings}}{K{\footnote K tomorrow in date strings}}{K{\footnote K yesterday in date strings}}The string {\f1{}tomorrow} is worth one day in the future (equivalent to {\f1{}day}), the string {\f1{}yesterday} is worth one day in the past (equivalent to {\f1{}day ago}).\par
\par
\pard{}{K{\footnote K now in date strings}}{K{\footnote K today in date strings}}{K{\footnote K this in date strings}}The strings {\f1{}now} or {\f1{}today} are relative items corresponding to zero-valued time displacement, these strings come from the fact a zero-valued time displacement represents the current time when not otherwise change by previous items.  They may be used to stress other items, like in {\f1{}12:00 today}.  The string {\f1{}this} also has the meaning of a zero-valued time displacement, but is preferred in date strings like {\f1{}this thursday}.\par
\par
\pard{}When a relative item makes the resulting date to cross the boundary between DST and non-DST (or vice-versa), the hour is adjusted according to the local time.\par
\par
\page\pard Node: {\b Pure numbers in date strings}, \keepn Next: {\uldb Authors of getdate}{\v Authors_of_getdate}, Prev: {\uldb Relative item in date strings}{\v Relative_item_in_date_strings}, Up: {\uldb Date input formats}{\v Date_input_formats}\line
K{\footnote K Pure numbers in date strings}
#{\footnote Pure_numbers_in_date_strings}
${\footnote \pard{}Pure numbers in date strings}\par
\pard{\fs24\b Pure numbers in date strings}\par
\par
\pard{}{K{\footnote K pure numbers in date strings}} The precise intepretation of a pure decimal number is dependent of the context in the date string.\par
\par
\pard{}If the decimal number is of the form {\i yyyy}{\i mm}{\i dd} and no other calendar date item (see {\uldb Calendar date item}{\v Calendar_date_item}) appears before it in the date string, then {\i yyyy} is read as the year, {\i mm} as the month number and {\i dd} as the day of the month, for the specified calendar date.\par
\par
\pard{}If the decimal number is of the form {\i hh}{\i mm} and no other time of day item appears before it in the date string, then {\i hh} is read as the hour of the day and {\i mm} as the minute of the hour, for the specified time of the day.  {\i mm} can also be omitted.\par
\par
\pard{}If both a calendar date and a time of day appear to the left of a number in the date string, but no relative item, then the number overrides the year.\par
\par
\page\pard Node: {\b Authors of getdate}, \keepn Next: {\uldb }{\v }, Prev: {\uldb Pure numbers in date strings}{\v Pure_numbers_in_date_strings}, Up: {\uldb Date input formats}{\v Date_input_formats}\line
K{\footnote K Authors of getdate}
#{\footnote Authors_of_getdate}
${\footnote \pard{}Authors of {\f1{}getdate}}\par
\pard{\fs24\b Authors of {\f1{}getdate}}\par
\par
\pard{}{K{\footnote K authors of {\f1{}getdate}}} {K{\footnote K Bellovin, Steven M.}}{K{\footnote K Salz, Rich}}{K{\footnote K Berets, Jim}}{K{\footnote K MacKenzie, David}}{K{\footnote K Meyering, Jim}}{\f1{}getdate} was originally implemented by Steven M. Bellovin ({\f1{}smb@research.att.com}) while at the University of North Carolina at Chapel Hill.  The code was later tweaked by a couple of people on Usenet, then completely overhauled by Rich $alz ({\f1{}rsalz@bbn.com}) and Jim Berets ({\f1{}jberets@bbn.com}) in August, 1990.  Various revisions for the GNU system were made by David MacKenzie, Jim Meyering, and others.\par
\par
\pard{}{K{\footnote K Pinard, F.}}{K{\footnote K Berry, K.}}This chapter was originally produced by Franc,ois Pinard ({\f1{}pinard@iro.umontreal.ca}) from the {\f1{}getdate.y} source code, and then edited by K. Berry ({\f1{}kb@cs.umb.edu}).\par
\par
\page\pard Node: {\b Formats}, \keepn Next: {\uldb Media}{\v Media}, Prev: {\uldb Date input formats}{\v Date_input_formats}, Up: {\uldb Top}{\v Top}\line
K{\footnote K Formats}
#{\footnote Formats}
${\footnote \pard{}Controlling the Archive Format}\par
\pard{\fs24\b Controlling the Archive Format}\par
\par
{\par
\pard\keep\fi-2880\li2880\tx2880{}{\uldb Portability}{\v Portability}\tab Making {\f1{}tar} Archives More Portable\par
{\uldb Compression}{\v Compression}\tab Using Less Space through Compression\par
{\uldb Attributes}{\v Attributes}\tab Handling File Attributes\par
{\uldb Standard}{\v Standard}\tab The Standard Format\par
{\uldb Extensions}{\v Extensions}\tab GNU Extensions to the Archive Format\par
{\uldb cpio}{\v cpio}\tab Comparison of {\f1{}tar} and {\f1{}cpio}\par
\pard{}}\par
\page\pard Node: {\b Portability}, \keepn Next: {\uldb Compression}{\v Compression}, Prev: {\uldb Formats}{\v Formats}, Up: {\uldb Formats}{\v Formats}\line
K{\footnote K Portability}
#{\footnote Portability}
${\footnote \pard{}Making {\f1{}tar} Archives More Portable}\par
\pard{\fs24\b Making {\f1{}tar} Archives More Portable}\par
\par
\pard{}Creating a {\f1{}tar} archive on a particular system that is meant to be useful later on many other machines and with other versions of {\f1{}tar} is more challenging than you might think.  {\f1{}tar} archive formats have been evolving since the first versions of Unix.  Many such formats are around, and are not always comptible with each other.  This section discusses a few problems, and gives some advice about making {\f1{}tar} archives more portable.\par
\par
\pard{}One golden rule is simplicity.  For example, limit your {\f1{}tar} archives to contain only regular files and directories, avoiding other kind of special files.  Do not attempt to save sparse files or contiguous files as such.  Let's discuss a few more problems, in turn.\par
\par
{\par
\pard\keep\fi-2880\li2880\tx2880{}{\uldb Portable Names}{\v Portable_Names}\tab Portable Names\par
{\uldb dereference}{\v dereference}\tab Symbolic Links\par
{\uldb old}{\v old}\tab Old V7 Archives\par
{\uldb posix}{\v posix}\tab POSIX archives\par
{\uldb Checksumming}{\v Checksumming}\tab Checksumming Problems\par
\pard{}}\par
\page\pard Node: {\b Portable Names}, \keepn Next: {\uldb dereference}{\v dereference}, Prev: {\uldb Portability}{\v Portability}, Up: {\uldb Portability}{\v Portability}\line
K{\footnote K Portable Names}
#{\footnote Portable_Names}
${\footnote \pard{}Portable Names}\par
\pard{\fs24\b Portable Names}\par
\par
\pard{}Use {\i straight} file and directory names, made up of printable ASCII characters, avoiding colons, slashes, backslashes, spaces, and other {\i dangerous} characters.  Avoid deep directory nesting.  Accounting for oldish System V machines, limit your file and directory names to 14 characters or less.\par
\par
\pard{}If you intend to have your {\f1{}tar} archives to be read under MSDOS, you should not rely on case distinction for file names, and you might use the GNU {\f1{}doschk} program for helping you further diagnosing illegal MSDOS names, which are even more limited than System V's.\par
\par
\page\pard Node: {\b dereference}, \keepn Next: {\uldb old}{\v old}, Prev: {\uldb Portable Names}{\v Portable_Names}, Up: {\uldb Portability}{\v Portability}\line
K{\footnote K dereference}
#{\footnote dereference}
${\footnote \pard{}Symbolic Links}\par
\pard{\fs24\b Symbolic Links}\par
\par
\pard{}{K{\footnote K File names, using symbolic links}}{K{\footnote K Symbolic link as file name}} Normally, when {\f1{}tar} archives a symbolic link, it writes a block to the archive naming the target of the link.  In that way, the {\f1{}tar} archive is a faithful record of the filesystem contents.  {\f1{}--dereference} ({\f1{}-h}) is used with {\f1{}--create} ({\f1{}-c}), and causes {\f1{}tar} to archive the files symbolic links point to, instead of the links themselves.  When this option is used, when {\f1{}tar} encounters a symbolic link, it will archive the linked-to file, instead of simply recording the presence of a symbolic link.\par
\par
\pard{}The name under which the file is stored in the file system is not recorded in the archive.  To record both the symbolic link name and the file name in the system, archive the file under both names.  If all links were recorded automatically by {\f1{}tar}, an extracted file might be linked to a file name that no longer exists in the file system.\par
\par
\pard{}If a linked-to file is encountered again by {\f1{}tar} while creating the same archive, an entire second copy of it will be stored.  (This {\i might} be considered a bug.)\par
\par
\pard{}So, for portable archives, do not archive symbolic links as such, and use {\f1{}--dereference} ({\f1{}-h}): many systems do not support symbolic links, and moreover, your distribution might be unusable if it contains unresolved symbolic links.\par
\par
\page\pard Node: {\b old}, \keepn Next: {\uldb posix}{\v posix}, Prev: {\uldb dereference}{\v dereference}, Up: {\uldb Portability}{\v Portability}\line
K{\footnote K old}
#{\footnote old}
${\footnote \pard{}Old V7 Archives}\par
\pard{\fs24\b Old V7 Archives}\par
\par
\pard{}{K{\footnote K Format, old style}}{K{\footnote K Old style format}}{K{\footnote K Old style archives}} Certain old versions of {\f1{}tar} cannot handle additional information recorded by newer {\f1{}tar} programs.  To create an archive in V7 format (not ANSI), which can be read by these old versions, specify the {\f1{}--old-archive} ({\f1{}-o}) option in conjunction with the {\f1{}--create} ({\f1{}-c}).  {\f1{}tar} also accepts {\f1{}--portability} for this option.  When you specify it, {\f1{}tar} leaves out information about directories, pipes, fifos, contiguous files, and device files, and specifies file ownership by group and user IDs instead of group and user names.\par
\par
\pard{}When updating an archive, do not use {\f1{}--old-archive} ({\f1{}-o}) unless the archive was created with using this option.\par
\par
\pard{}In most cases, a {\i new} format archive can be read by an {\i old} {\f1{}tar} program without serious trouble, so this option should seldom be needed.  On the other hand, most modern {\f1{}tar}s are able to read old format archives, so it might be safer for you to always use {\f1{}--old-archive} ({\f1{}-o}) for your distributions.\par
\par
\page\pard Node: {\b posix}, \keepn Next: {\uldb Checksumming}{\v Checksumming}, Prev: {\uldb old}{\v old}, Up: {\uldb Portability}{\v Portability}\line
K{\footnote K posix}
#{\footnote posix}
${\footnote \pard{}GNU {\f1{}tar} and POSIX {\f1{}tar}}\par
\pard{\fs24\b GNU {\f1{}tar} and POSIX {\f1{}tar}}\par
\par
\pard{}GNU {\f1{}tar} was based on an early draft of the POSIX 1003.1 {\f1{}ustar} standard.  GNU extensions to {\f1{}tar}, such as the support for file names longer than 100 characters, use portions of the {\f1{}tar} header record which were specified in that POSIX draft as unused.  Subsequent changes in POSIX have allocated the same parts of the header record for other purposes.  As a result, GNU {\f1{}tar} is incompatible with the current POSIX spec, and with {\f1{}tar} programs that follow it.\par
\par
\pard{}We plan to reimplement these GNU extensions in a new way which is upward compatible with the latest POSIX {\f1{}tar} format, but we don't know when this will be done.\par
\par
\pard{}In the mean time, there is simply no telling what might happen if you read a GNU {\f1{}tar} archive, which uses the GNU extensions, using some other {\f1{}tar} program.  So if you want to read the archive with another {\f1{}tar} program, be sure to write it using the {\f1{}--old-archive} option ({\f1{}-o}).\par
\par
\pard{}Traditionally, old {\f1{}tar}s have a limit of 100 characters.  GNU {\f1{}tar} attempted two different approaches to overcome this limit, using and extending a format specified by a draft of some P1003.1.  The first way was not that successful, and involved {\f1{}@MaNgLeD@} file names, or such; while a second approach used {\f1{}././@LongLink} and other tricks, yielding better success.  In theory, GNU {\f1{}tar} should be able to handle file names of practically unlimited length.  So, if GNU {\f1{}tar} fails to dump and retrieve files having more than 100 characters, then there is a bug in GNU {\f1{}tar}, indeed.\par
\par
\pard{}But, being strictly POSIX, the limit was still 100 characters.  For various other purposes, GNU {\f1{}tar} used areas left unassigned in the POSIX draft.  POSIX later revised P1003.1 {\f1{}ustar} format by assigning previously unused header fields, in such a way that the upper limit for file name length was raised to 256 characters.  However, the actual POSIX limit oscillates between 100 and 256, depending on the precise location of slashes in full file name (this is rather ugly).  Since GNU {\f1{}tar} use the same fields for quite other purposes, it became incompatible with the latest POSIX standards.\par
\par
\pard{}For longer or non-fitting file names, we plan to use yet another set of GNU extensions, but this time, complying with the provisions POSIX offers for extending the format, rather than conflicting with it.  Whenever an archive uses old GNU {\f1{}tar} extension format or POSIX extensions, would it be for very long file names or other specialities, this archive becomes non-portable to other {\f1{}tar} implementations.  In fact, anything can happen.  The most forgiving {\f1{}tar}s will merely unpack the file using a wrong name, and maybe create another file named something like {\f1{}@LongName}, with the true file name in it.  {\f1{}tar}s not protecting themselves may segment violate!\par
\par
\pard{}Compatibility concerns make all this thing more difficult, as we will have to support {\i all} these things together, for a while.  GNU {\f1{}tar} should be able to produce and read true POSIX format files, while being able to detect old GNU {\f1{}tar} formats, besides old V7 format, and process them conveniently.  It would take years before this whole area stabilizes...\par
\par
\pard{}There are plans to raise this 100 limit to 256, and yet produce POSIX conformant archives.  Past 256, I do not know yet if GNU {\f1{}tar} will go non-POSIX again, or merely refuse to archive the file.\par
\par
\pard{}There are plans so GNU {\f1{}tar} support more fully the latest POSIX format, while being able to read old V7 format, GNU (semi-POSIX plus extension), as well as full POSIX.  One may ask if there is part of the POSIX format that we still cannot support.  This simple question has a complex answer.  Maybe that, on intimate look, some strong limitations will pop up, but until now, nothing sounds too difficult (but see below).  I only have these few pages of POSIX telling about `Extended tar Format' (P1003.1-1990 - section 10.1.1), and there are references to other parts of the standard I do not have, which should normally enforce limitations on stored file names (I suspect things like fixing what {\f1{}/} and {\f1{}<NUL>} means).  There are also some points which the standard does not make clear, Existing practice will then drive what I should do.\par
\par
\pard{}POSIX mandates that, when a file name cannot fit within 100 to 256 characters (the variance comes from the fact a {\f1{}/} is ideally needed as the 156'th character), or a link name cannot fit within 100 characters, a warning should be issued and the file {\i not} be stored.  Unless some {\f1{}--posix} option is given (or {\f1{}POSIXLY_CORRECT} is set), I suspect that GNU {\f1{}tar} should disobey this specification, and automatically switch to using GNU extensions to overcome file name or link name length limitations.\par
\par
\pard{}There is a problem, however, which I did not intimately studied yet.  Given a truly POSIX archive with names having more than 100 characters, I guess that GNU {\f1{}tar} up to 1.11.8 will process it as if it were an old V7 archive, and be fooled by some fields which are coded differently.  So, the question is to decide if the next generation of GNU {\f1{}tar} should produce POSIX format by default, whenever possible, producing archives older versions of GNU {\f1{}tar} might not be able to read correctly.  I fear that we will have to suffer such a choice one of these days, if we want GNU {\f1{}tar} to go closer to POSIX.  We can rush it.  Another possibility is to produce the current GNU {\f1{}tar} format by default for a few years, but have GNU {\f1{}tar} versions from some 1.{\i POSIX} and up able to recognize all three formats, and let older GNU {\f1{}tar} fade out slowly.  Then, we could switch to producing POSIX format by default, with not much harm to those still having (very old at that time) GNU {\f1{}tar} versions prior to 1.{\i POSIX}.\par
\par
\pard{}POSIX format cannot represent very long names, volume headers, splitting of files in multi-volumes, sparse files, and incremental dumps; these would be all disallowed if {\f1{}--posix} or {\f1{}POSIXLY_CORRECT}.  Otherwise, if {\f1{}tar} is given long names, or {\f1{}-[VMSgG]}, then it should automatically go non-POSIX.  I think this is easily granted without much discussion.\par
\par
\pard{}Another point is that only {\f1{}mtime} is stored in POSIX archives, while GNU {\f1{}tar} currently also store {\f1{}atime} and {\f1{}ctime}.  If we want GNU {\f1{}tar} to go closer to POSIX, my choice would be to drop {\f1{}atime} and {\f1{}ctime} support on average.  On the other hand, I perceive that full dumps or incremental dumps need {\f1{}atime} and {\f1{}ctime} support, so for those special applications, POSIX has to be avoided altogether.\par
\par
\pard{}A few users requested that {\f1{}--sparse} ({\f1{}-S}) be always active by default, I think that before replying to them, we have to decide if we want GNU {\f1{}tar} to go closer to POSIX on average, while producing files.  My choice would be to go closer to POSIX in the long run.  Besides possible double reading, I do not see any point of not trying to save files as sparse when creating archives which are neither POSIX nor old-V7, so the actual {\f1{}--sparse} ({\f1{}-S}) would become selected by default when producing such archives, whatever the reason is.  So, {\f1{}--sparse} ({\f1{}-S}) alone might be redefined to force GNU-format archives, and recover its previous meaning from this fact.\par
\par
\pard{}GNU-format as it exists now can easily fool other POSIX {\f1{}tar}, as it uses fields which POSIX considers to be part of the file name prefix.  I wonder if it would not be a good idea, in the long run, to try changing GNU-format so any added field (like {\f1{}ctime}, {\f1{}atime}, file offset in subsequent volumes, or sparse file descriptions) be wholly and always pushed into an extension block, instead of using space in the POSIX header block.  I could manage to do that portably between future GNU {\f1{}tar}s.  So other POSIX {\f1{}tar}s might be at least able to provide kind of correct listings for the archives produced by GNU {\f1{}tar}, if not able to process them otherwise.\par
\par
\pard{}Using these projected extensions might induce older {\f1{}tar}s to fail.  We would use the same approach as for POSIX.  I'll put out a {\f1{}tar} capable of reading POSIXier, yet extended archives, but will not produce this format by default, in GNU mode.  In a few years, when newer GNU {\f1{}tar}s will have flooded out {\f1{}tar} 1.11.X and previous, we could switch to producing POSIXier extended archives, with no real harm to users, as almost all existing GNU {\f1{}tar}s will be ready to read POSIXier format.  In fact, I'll do both changes at the same time, in a few years, and just prepare {\f1{}tar} for both changes, without effecting them, from 1.{\i POSIX}.  (Both changes: 1--using POSIX convention for getting over 100 characters; 2--avoiding mangling POSIX headers for GNU extensions, using only POSIX mandated extension techniques).\par
\par
\pard{}So, a future {\f1{}tar} will have a {\f1{}--posix} flag forcing the usage of truly POSIX headers, and so, producing archives previous GNU {\f1{}tar} will not be able to read.  So, {\i once} pretest will announce that feature, it would be particularly useful that users test how exchangeable will be archives between GNU {\f1{}tar} with {\f1{}--posix} and other POSIX {\f1{}tar}.\par
\par
\pard{}In a few years, when GNU {\f1{}tar} will produce POSIX headers by default, {\f1{}--posix} will have a strong meaning and will disallow GNU extensions.  But in the meantime, for a long while, {\f1{}--posix} in GNU tar will not disallow GNU extensions like {\f1{}--label={\i archive-label}} ({\f1{}-V {\i archive-label}}), {\f1{}--multi-volume} ({\f1{}-M}), {\f1{}--sparse} ({\f1{}-S}), or very long file or link names.  However, {\f1{}--posix} with GNU extensions will use POSIX headers with reserved-for-users extensions to headers, and I will be curious to know how well or bad POSIX {\f1{}tar}s will react to these.\par
\par
\pard{}GNU {\f1{}tar} prior to 1.{\i POSIX}, and after 1.{\i POSIX} without {\f1{}--posix}, generates and checks {\f1{}ustar  }, with two suffixed spaces.  This is sufficient for older GNU {\f1{}tar} not to recognize POSIX archives, and consequently, wrongly decide those archives are in old V7 format.  It is a useful bug for me, because GNU {\f1{}tar} has other POSIX incompatibilities, and I need to segregate GNU {\f1{}tar} semi-POSIX archives from truly POSIX archives, for GNU {\f1{}tar} should be somewhat compatible with itself, while migrating closer to latest POSIX standards.  So, I'll be very careful about how and when I will do the correction.\par
\par
\page\pard Node: {\b Checksumming}, \keepn Next: {\uldb }{\v }, Prev: {\uldb posix}{\v posix}, Up: {\uldb Portability}{\v Portability}\line
K{\footnote K Checksumming}
#{\footnote Checksumming}
${\footnote \pard{}Checksumming Problems}\par
\pard{\fs24\b Checksumming Problems}\par
\par
\pard{}SunOS and HP-UX {\f1{}tar} fail to accept archives created using GNU {\f1{}tar} and containing non-ASCII file names, that is, file names having characters with the eight bit set, because they use signed checksums, while GNU {\f1{}tar} uses unsigned checksums while creating archives, as per POSIX standards.  On reading, GNU {\f1{}tar} computes both checksums and accept any.  It is somewhat worrying that a lot of people may go around doing backup of their files using faulty (or at least non-standard) software, not learning about it until it's time to restore their missing files with an incompatible file extractor, or vice versa.\par
\par
\pard{}GNU {\f1{}tar} compute checksums both ways, and accept any on read, so GNU tar can read Sun tapes even with their wrong checksums.  GNU {\f1{}tar} produces the standard checksum, however, raising incompatibilities with Sun.  That is to say, GNU {\f1{}tar} has not been modified to {\i produce} incorrect archives to be read by buggy {\f1{}tar}'s.  I've been told that more recent Sun {\f1{}tar} now read standard archives, so maybe Sun did a similar patch, after all?\par
\par
\pard{}The story seems to be that when Sun first imported {\f1{}tar} sources on their system, they recompiled it without realizing that the checksums were computed differently, because of a change in the default signing of {\f1{}char}'s in their compiler.  So they started computing checksums wrongly.  When they later realized their mistake, they merely decided to stay compatible with it, and with themselves afterwards.  Presumably, but I do not really know, HP-UX has chosen that their {\f1{}tar} archives to be compatible with Sun's.  The current standards do not favor Sun {\f1{}tar} format.  In any case, it now falls on the shoulders of SunOS and HP-UX users to get a {\f1{}tar} able to read the good archives they receive.\par
\par
\page\pard Node: {\b Compression}, \keepn Next: {\uldb Attributes}{\v Attributes}, Prev: {\uldb Portability}{\v Portability}, Up: {\uldb Formats}{\v Formats}\line
K{\footnote K Compression}
#{\footnote Compression}
${\footnote \pard{}Using Less Space through Compression}\par
\pard{\fs24\b Using Less Space through Compression}\par
\par
{\par
\pard\keep\fi-2880\li2880\tx2880{}{\uldb gzip}{\v gzip}\tab Creating and Reading Compressed Archives\par
{\uldb sparse}{\v sparse}\tab Archiving Sparse Files\par
\pard{}}\par
\page\pard Node: {\b gzip}, \keepn Next: {\uldb sparse}{\v sparse}, Prev: {\uldb Compression}{\v Compression}, Up: {\uldb Compression}{\v Compression}\line
K{\footnote K gzip}
#{\footnote gzip}
${\footnote \pard{}Creating and Reading Compressed Archives}\par
\pard{\fs24\b Creating and Reading Compressed Archives}\par
\par
\pard{}{K{\footnote K Compressed archives}}{K{\footnote K Storing archives in compressed format}}{{\par
{\i \pard\li720{}(This message will disappear, once this node revised.)}\par
\pard{}}}\par
{\pard{}{\f1{}-z}\par
\pard{}{\f1{}--gzip}\par
\pard{}{\f1{}--ungzip}\par
\pard\li720{}Filter the archive through {\f1{}gzip}.\par
\pard{}}\par
\pard{}Some format parameters must be taken into consideration when modifying an archive: .  Compressed archives cannot be modified.\par
\par
\pard{}You can use {\f1{}--gzip} and {\f1{}--gunzip} on physical devices (tape drives, etc.) and remote files as well as on normal files; data to or from such devices or remote files is reblocked by another copy of the {\f1{}tar} program to enforce the specified (or default) record size.  The default compression parameters are used; if you need to override them, avoid the {\f1{}--gzip} ({\f1{}--gunzip}, {\f1{}--ungzip}, {\f1{}-z}) option and run {\f1{}gzip} explicitly.  (Or set the {\f1{}GZIP} environment variable.)\par
\par
\pard{}The {\f1{}--gzip} ({\f1{}--gunzip}, {\f1{}--ungzip}, {\f1{}-z}) option does not work with the {\f1{}--multi-volume} ({\f1{}-M}) option, or with the {\f1{}--update} ({\f1{}-u}), {\f1{}--append} ({\f1{}-r}), {\f1{}--concatenate} ({\f1{}--catenate}, {\f1{}-A}), or {\f1{}--delete} operations.\par
\par
\pard{}It is not exact to say that GNU {\f1{}tar} is to work in concert with {\f1{}gzip} in a way similar to {\f1{}zip}, say.  Surely, it is possible that {\f1{}tar} and {\f1{}gzip} be done with a single call, like in:\par
\par
{\pard\keep\li720\f1{}$ tar cfz archive.tar.gz subdir\par
\pard\f0{}}\par
\pard{}to save all of {\f1{}subdir} into a {\f1{}gzip}'ed archive.  Later you can do:\par
\par
{\pard\keep\li720\f1{}$ tar xfz archive.tar.gz\par
\pard\f0{}}\par
\pard{}to explode and unpack.\par
\par
\pard{}The difference is that the whole archive is compressed.  With {\f1{}zip}, archive members are archived individually.  {\f1{}tar}'s method yields better compression.  On the other hand, one can view the contents of a {\f1{}zip} archive without having to decompress it.  As for the {\f1{}tar} and {\f1{}gzip} tandem, you need to decompress the archive to see its contents.  However, this may be done without needing disk space, by using pipes internally:\par
\par
{\pard\keep\li720\f1{}$ tar tfz archive.tar.gz\par
\pard\f0{}}\par
\pard{}{K{\footnote K corrupted archives}}About corrupted compressed archives: {\f1{}gzip}'ed files have no redundancy, for maximum compression.  The adaptive nature of the compression scheme means that the compression tables are implicitly spread all over the archive.  If you lose a few blocks, the dynamic construction of the compression tables becomes unsychronized, and there is little chance that you could recover later in the archive.\par
\par
\pard{}There are pending suggestions for having a per-volume or per-file compression in GNU {\f1{}tar}.  This would allow for viewing the contents without decompression, and for resynchronizing decompression at every volume or file, in case of corrupted archives.  Doing so, we might loose some compressibility.  But this would have make recovering easier.  So, there are pros and cons.  We'll see!\par
\par
{\pard{}{\f1{}-Z}\par
\pard{}{\f1{}--compress}\par
\pard{}{\f1{}--uncompress}\par
\pard\li720{}Filter the archive through {\f1{}compress}.  Otherwise like {\f1{}--gzip} ({\f1{}--gunzip}, {\f1{}--ungzip}, {\f1{}-z}).\par
\par
\pard{}{\f1{}--use-compress-program={\i prog}}\par
\pard\li720{}Filter through {\i prog} (must accept {\f1{}-d}).\par
\pard{}}\par
\pa\'7BNo Value For "rd\'7B\'7Dop-compress"\'7D stores an archive in compressed format.  This option is useful in saving time over networks and space in pipes, and when storage space is at a premium.  {\f1{}--compress} ({\f1{}--uncompress}, {\f1{}-Z}) causes {\f1{}tar} to compress when writing the archive, or to uncompress when reading the archive.\par
\par
\pard{}To perform compression and uncompression on the archive, {\f1{}tar} runs the {\f1{}compress} utility.  {\f1{}tar} uses the default compression parameters; if you need to override them, avoid the {\f1{}--compress} ({\f1{}--uncompress}, {\f1{}-Z}) option and run the {\f1{}compress} utility explicitly.  It is useful to be able to call the {\f1{}compress} utility from within {\f1{}tar} because the {\f1{}compress} utility by itself cannot access remote tape drives.\par
\par
\pard{}The {\f1{}--compress} ({\f1{}--uncompress}, {\f1{}-Z}) option will not work in conjunction with the {\f1{}--multi-volume} ({\f1{}-M}) option or the {\f1{}--append} ({\f1{}-r}), {\f1{}--update} ({\f1{}-u}), {\f1{}--append} ({\f1{}-r}) and {\f1{}--delete} operations.  See {\uldb Operations}{\v Operations}, for more information on these operations.\par
\par
\pard{}If there is no compress utility available, {\f1{}tar} will report an error.  {\b Please note} that the {\f1{}compress} program may be covered by a patent, and therefore we recommend you stop using it.\par
\par
{\pard{}{\f1{}--compress}\par
\pard{}{\f1{}--uncompress}\par
\pard{}{\f1{}-z}\par
\pard{}{\f1{}-Z}\par
\pard\li720{}When this option is specified, {\f1{}tar} will compress (when writing an archive), or uncompress (when reading an archive).  Used in conjunction with the {\f1{}--create} ({\f1{}-c}), {\f1{}--extract} ({\f1{}--get}, {\f1{}-x}), {\f1{}--list} ({\f1{}-t}) and {\f1{}--compare} ({\f1{}--diff}, {\f1{}-d}) operations.\par
\pard{}}\par
\pard{}You can have archives be compressed by using the {\f1{}--gzip} ({\f1{}--gunzip}, {\f1{}--ungzip}, {\f1{}-z}) option.  This will arrange for {\f1{}tar} to use the {\f1{}gzip} program to be used to compress or uncompress the archive wren writing or reading it.\par
\par
\pard{}To use the older, obsolete, {\f1{}compress} program, use the {\f1{}--compress} ({\f1{}--uncompress}, {\f1{}-Z}) option.  The GNU Project recommends you not use {\f1{}compress}, because there is a patent covering the algorithm it uses.  You could be sued for patent infringment merely by running {\f1{}compress}.\par
\par
\pard{}I have one question, or maybe it's a suggestion if there isn't a way to do it now. I would like to use {\f1{}--gzip} ({\f1{}--gunzip}, {\f1{}--ungzip}, {\f1{}-z}), but I'd also like the output to be fed through a program like GNU {\f1{}ecc} (actually, right now that's {\f1{}exactly} what I'd like to use :-)), basically adding ECC protection on top of compression.  It seems as if this should be quite easy to do, but I can't work out exactly how to go about it.  Of course, I can pipe the standard output of {\f1{}tar} through {\f1{}ecc}, but then I lose (though I haven't started using it yet, I confess) the ability to have {\f1{}tar} use {\f1{}rmt} for it's I/O (I think).\par
\par
\pard{}I think the most straightforward thing would be to let me specify a general set of filters outboard of compression (preferably ordered, so the order can be automatically reversed on input operations, and with the options they require specifiable), but beggars shouldn't be choosers and anything you decide on would be fine with me.\par
\par
\pard{}By the way, I like {\f1{}ecc} but if (as the comments say) it can't deal with loss of block sync, I'm tempted to throw some time at adding that capability.  Supposing I were to actually do such a thing and get it (apparantly) working, do you accept contributed changes to utilities like that?  (Leigh Clayton {\f1{}loc@soliton.com}, May 1995).\par
\par
\pard{}Isn't that exactly the role of the {\f1{}--use-compress-prog={\i program}} option?  I never tried it myself, but I suspect you may want to write a {\i prog} script or program able to filter stdin to stdout to way you want.  It should recognize the {\f1{}-d} option, for when extraction is needed rather than creation.\par
\par
\pard{}It has been reported that if one writes compressed data (through the {\f1{}--gzip} ({\f1{}--gunzip}, {\f1{}--ungzip}, {\f1{}-z}) or {\f1{}--compress} ({\f1{}--uncompress}, {\f1{}-Z}) options) to a DLT and tries to use the DLT compression mode, the data will actually get bigger and one will end up with less space on the tape.\par
\par
\page\pard Node: {\b sparse}, \keepn Next: {\uldb }{\v }, Prev: {\uldb gzip}{\v gzip}, Up: {\uldb Compression}{\v Compression}\line
K{\footnote K sparse}
#{\footnote sparse}
${\footnote \pard{}Archiving Sparse Files}\par
\pard{\fs24\b Archiving Sparse Files}\par
\par
\pard{}{K{\footnote K Sparse Files}}{{\par
{\i \pard\li720{}(This message will disappear, once this node revised.)}\par
\pard{}}}\par
{\pard{}{\f1{}-S}\par
\pard{}{\f1{}--sparse}\par
\pard\li720{}Handle sparse files efficiently.\par
\pard{}}\par
\pard{}This option causes all files to be put in the archive to be tested for sparseness, and handled specially if they are.  The {\f1{}--sparse} ({\f1{}-S}) option is useful when many {\f1{}dbm} files, for example, are being backed up.  Using this option dramatically decreases the amount of space needed to store such a file.\par
\par
\pard{}In later versions, this option may be removed, and the testing and treatment of sparse files may be done automatically with any special GNU options.  For now, it is an option needing to be specified on the command line with the creation or updating of an archive.\par
\par
\pard{}Files in the filesystem occasionally have "holes."  A hole in a file is a section of the file's contents which was never written.  The contents of a hole read as all zeros.  On many operating systems, actual disk storage is not allocated for holes, but they are counted in the length of the file.  If you archive such a file, {\f1{}tar} could create an archive longer than the original.  To have {\f1{}tar} attempt to recognize the holes in a file, use {\f1{}--sparse} ({\f1{}-S}).  When you use the {\f1{}--sparse} ({\f1{}-S}) option, then, for any file using less disk space than would be expected from its length, {\f1{}tar} searches the file for consecutive stretches of zeros.  It then records in the archive for the file where the consecutive stretches of zeros are, and only archives the "real contents" of the file.  On extraction (using {\f1{}--sparse} ({\f1{}-S}) is not needed on extraction) any such files have hols created wherever the continuous stretches of zeros were found.  Thus, if you use {\f1{}--sparse} ({\f1{}-S}), {\f1{}tar} archives won't take more space than the original.\par
\par
\pard{}A file is sparse if it contains blocks of zeros whose existence is recorded, but that have no space allocated on disk.  When you specify the {\f1{}--sparse} ({\f1{}-S}) option in conjunction with the {\f1{}--create} ({\f1{}-c}) operation, {\f1{}tar} tests all files for sparseness while archiving.  If {\f1{}tar} finds a file to be sparse, it uses a sparse representation of the file in the archive.  See {\uldb create}{\v create}, for more information about creating archives.\par
\par
\pa\'7BNo Value For "rd\'7B\'7Dop-sparse"\'7D is useful when archiving files, such as dbm files, likely to contain many nulls.  This option dramatically decreases the amount of space needed to store such an archive.\par
\par
{{\b \pard\li720{}Please Note:} Always use {\f1{}--sparse} ({\f1{}-S}) when performing file system backups, to avoid archiving the expanded forms of files stored sparsely in the system.\par
\par
\pard\li720{}Even if your system has no sparse files currently, some may be created in the future.  If you use {\f1{}--sparse} ({\f1{}-S}) while making file system backups as a matter of course, you can be assured the archive will never take more space on the media than the files take on disk (otherwise, archiving a disk filled with sparse files might take hundreds of tapes).\par
\pard{}}\par
{\f1{}\pard{}tar} ignores the {\f1{}--sparse} ({\f1{}-S}) option when reading an archive.\par
\par
{\pard{}{\f1{}--sparse}\par
\pard{}{\f1{}-S}\par
\pard\li720{}Files stored sparsely in the file system are represented sparsely in the archive.  Use in conjunction with write operations.\par
\pard{}}\par
\pard{}However, users should be well aware that at archive creation time, GNU {\f1{}tar} still has to read whole disk file to locate the \'A2holes\'A2, and so, even if sparse files use little space on disk and in the archive, they may sometimes require inordinate amount of time for reading and examining all-zero blocks of a file.  Although it works, it's painfully slow for a large (sparse) file, even though the resulting tar archive may be small.  (One user reports that dumping a {\f1{}core} file of over 400 megabytes, but with only about 3 megabytes of actual data, took about 9 minutes on a Sun Sparstation ELC, with full CPU utilisation.)\par
\par
\pard{}This reading is required in all cases and is not related to the fact the {\f1{}--sparse} ({\f1{}-S}) option is used or not, so by merely {\i not} using the option, you are not saving time({\ul 1}{\v sparse_1}).\par
\par
\pard{}Programs like {\f1{}dump} do not have to read the entire file; by examining the file system directly, they can determine in advance exactly where the holes are and thus avoid reading through them.  The only data it need read are the actual allocated data blocks.  GNU {\f1{}tar} uses a more portable and straightforward archiving approach, it would be fairly difficult that it does otherwise.  Elizabeth Zwicky writes to {\f1{}comp.unix.internals}, on 1990-12-10:\par
\par
{\pard\li720{}What I did say is that you cannot tell the difference between a hole and an equivalent number of nulls without reading raw blocks.  {\f1{}st_blocks} at best tells you how many holes there are; it doesn't tell you {\i where}.  Just as programs may, conceivably, care what {\f1{}st_blocks} is (care to name one that does?), they may also care where the holes are (I have no examples of this one either, but it's equally imaginable).\par
\par
\pard\li720{}I conclude from this that good archivers are not portable.  One can arguably conclude that if you want a portable program, you can in good conscience restore files with as many holes as possible, since you can't get it right.\par
\pard{}}\par
\page\pard#{\footnote sparse_1}
\pard{}(1) Well!  We should say the whole truth, here.  When {\f1{}--sparse} ({\f1{}-S}) is selected while creating an archive, the current {\f1{}tar} algorithm requires sparse files to be read twice, not once.  We hope to develop a new archive format for saving sparse files in which one pass will be sufficient.\par
\par
\page\pard Node: {\b Attributes}, \keepn Next: {\uldb Standard}{\v Standard}, Prev: {\uldb Compression}{\v Compression}, Up: {\uldb Formats}{\v Formats}\line
K{\footnote K Attributes}
#{\footnote Attributes}
${\footnote \pard{}Handling File Attributes}\par
\pard{\fs24\b Handling File Attributes}\par
\par
{{{\i \pard\li720{}(This message will disappear, once this node revised.)}\par
\pard{}}}\par
\pard{}When {\f1{}tar} reads files, this causes them to have the access times updated.  To have {\f1{}tar} attempt to set the access times back to what they were before they were read, use the {\f1{}--atime-preserve} option.  This doesn't work for files that you don't own, unless you're root, and it doesn't interact with incremental dumps nicely (see {\uldb Backups}{\v Backups}), but it is good enough for some purposes.\par
\par
\pard{}Handling of file attributes\par
\par
{\pard{}{\f1{}--atime-preserve}\par
\pard\li720{}Do not change access times on dumped files.\par
\par
\pard{}{\f1{}-m}\par
\pard{}{\f1{}--touch}\par
\pard\li720{}Do not extract file modified time.\par
\par
\pard\li720{}When this option is used, {\f1{}tar} leaves the modification times of the files it extracts as the time when the files were extracted, instead of setting it to the time recorded in the archive.\par
\par
\pard\li720{}This option is meaningless with {\f1{}--list} ({\f1{}-t}).\par
\par
\pard{}{\f1{}--same-owner}\par
\pard\li720{}Create extracted files with the same ownership they have in the archive.\par
\par
\pard\li720{}When using super-user at extraction time, ownership is always restored.  So, this option is meaningful only for non-root users, when {\f1{}tar} is executed on those systems able to give files away.  This is considered as a security flaw by many people, at least because it makes quite difficult to correctly account users for the disk space they occupy.  Also, the {\f1{}suid} or {\f1{}sgid} attributes of files are easily and silently lost when files are given away.\par
\par
\pard\li720{}When writing an archive, {\f1{}tar} writes the user id and user name separately.  If it can't find a user name (because the user id is not in {\f1{}/etc/passwd}), then it does not write one.  When restoring, and doing a {\f1{}chmod} like when you use {\f1{}--same-permissions} ({\f1{}--preserve-permissions}, {\f1{}-p}) (), it tries to look the name (if one was written) up in {\f1{}/etc/passwd}.  If it fails, then it uses the user id stored in the archive instead.\par
\par
\pard{}{\f1{}--numeric-owner}\par
\pard\li720{}The {\f1{}--numeric-owner} option allows (ANSI) archives to be written without user/group name information or such information to be ignored when extracting.  It effectively disables the generation and/or use of user/group name information.  This option forces extraction using the numeric ids from the archive, ignoring the names.\par
\par
\pard\li720{}This is useful in certain circumstances, when restoring a backup from an emergency floppy with different passwd/group files for example.  It is otherwise impossible to extract files with the right ownerships if the password file in use during the extraction does not match the one belonging to the filesystem(s) being extracted.  This occurs, for example, if you are restoring your files after a major crash and had booted from an emergency floppy with no password file or put your disk into another machine to do the restore.\par
\par
\pard\li720{}The numeric ids are {\i always} saved into {\f1{}tar} archives.  The identifying names are added at create time when provided by the system, unless {\f1{}--old-archive} ({\f1{}-o}) is used.  Numeric ids could be used when moving archives between a collection of machines using a centralized management for attribution of numeric ids to users and groups.  This is often made through using the NIS capabilities.\par
\par
\pard\li720{}When making a {\f1{}tar} file for distribution to other sites, it is sometimes cleaner to use a single owner for all files in the distribution, and nicer to specify the write permission bits of the files as stored in the archive independently of their actual value on the file system.  The way to prepare a clean distribution is usually to have some Makefile rule creating a directory, copying all needed files in that directory, then setting ownership and permissions as wanted (there are a lot of possible schemes), and only then making a {\f1{}tar} archive out of this directory, before cleaning everything out.  Of course, we could add a lot of options to GNU {\f1{}tar} for fine tuning permissions and ownership.  This is not the good way, I think.  GNU {\f1{}tar} is already crowded with options and moreover, the approach just explained gives you a great deal of control already.\par
\par
\pard{}{\f1{}-p}\par
\pard{}{\f1{}--same-permissions}\par
\pard{}{\f1{}--preserve-permissions}\par
\pard\li720{}Extract all protection information.\par
\par
\pard\li720{}This option causes {\f1{}tar} to set the modes (access permissions) of extracted files exactly as recorded in the archive.  If this option is not used, the current {\f1{}umask} setting limits the permissions on extracted files.\par
\par
\pard\li720{}This option is meaningless with {\f1{}--list} ({\f1{}-t}).\par
\par
\pard{}{\f1{}--preserve}\par
\pard\li720{}Same as both {\f1{}--same-permissions} ({\f1{}--preserve-permissions}, {\f1{}-p}) and {\f1{}--same-order} ({\f1{}--preserve-order}, {\f1{}-s}).\par
\par
\pard\li720{}The {\f1{}--preserve} option has no equivalent short option name.  It is equivalent to {\f1{}--same-permissions} ({\f1{}--preserve-permissions}, {\f1{}-p}) plus {\f1{}--same-order} ({\f1{}--preserve-order}, {\f1{}-s}).\par
\par
\pard{}}\par
\page\pard Node: {\b Standard}, \keepn Next: {\uldb Extensions}{\v Extensions}, Prev: {\uldb Attributes}{\v Attributes}, Up: {\uldb Formats}{\v Formats}\line
K{\footnote K Standard}
#{\footnote Standard}
${\footnote \pard{}The Standard Format}\par
\pard{\fs24\b The Standard Format}\par
\par
{{{\i \pard\li720{}(This message will disappear, once this node revised.)}\par
\pard{}}}\par
\pard{}While an archive may contain many files, the archive itself is a single ordinary file.  Like any other file, an archive file can be written to a storage device such as a tape or disk, sent through a pipe or over a network, saved on the active file system, or even stored in another archive.  An archive file is not easy to read or manipulate without using the {\f1{}tar} utility or Tar mode in GNU Emacs.\par
\par
\pard{}Physically, an archive consists of a series of file entries terminated by an end-of-archive entry, which consists of 512 zero bytes.  A file entry usually describes one of the files in the archive (an \'A2archive member\'A2), and consists of a file header and the contents of the file.  File headers contain file names and statistics, checksum information which {\f1{}tar} uses to detect file corruption, and information about file types.\par
\par
\pard{}Archives are permitted to have more than one member with the same member name.  One way this situation can occur is if more than one version of a file has been stored in the archive.  For information about adding new versions of a file to an archive, see {\uldb update}{\v update}, and to learn more about having more than one archive member with the same name, see .\par
\par
\pard{}In addition to entries describing archive members, an archive may contain entries which {\f1{}tar} itself uses to store information.  See {\uldb label}{\v label}, for an example of such an archive entry.\par
\par
\pard{}A {\f1{}tar} archive file contains a series of blocks.  Each block contains {\f1{}BLOCKSIZE} bytes.  Although this format may be thought of as being on magnetic tape, other media are often used.\par
\par
\pard{}Each file archived is represented by a header block which describes the file, followed by zero or more blocks which give the contents of the file.  At the end of the archive file there may be a block filled with binary zeros as an end-of-file marker.  A reasonable system should write a block of zeros at the end, but must not assume that such a block exists when reading an archive.\par
\par
\pard{}The blocks may be \'A2blocked\'A2 for physical I/O operations.  Each record of {\i n} blocks (where {\i n} is set by the {\f1{}--blocking-factor={\i 512-size}} ({\f1{}-b {\i 512-size}}) option to {\f1{}tar}) is written with a single {\f1{}write ()} operation.  On magnetic tapes, the result of such a write is a single record.  When writing an archive, the last record of blocks should be written at the full size, with blocks after the zero block containing all zeros.  When reading an archive, a reasonable system should properly handle an archive whose last record is shorter than the rest, or which contains garbage records after a zero block.\par
\par
\pard{}The header block is defined in C as follows.  In the GNU {\f1{}tar} distribution, this is part of file {\f1{}src/tar.h}:\par
\par
{\pard\keep\li720\f1{}/* GNU tar Archive Format description.  */\line
\line
/* If OLDGNU_COMPATIBILITY is not zero, tar produces archives which, by\line
   default, are readable by older versions of GNU tar.  This can be\line
   overriden by using --posix; in this case, POSIXLY_CORRECT in environment\line
   may be set for enforcing stricter conformance.  If OLDGNU_COMPATIBILITY\line
   is zero or undefined, tar will eventually produces archives which, by\line
   default, POSIX compatible; then either using --posix or defining\line
   POSIXLY_CORRECT enforces stricter conformance.\line
\line
   This #define will disappear in a few years.  FP, June 1995.  */\line
#define OLDGNU_COMPATIBILITY 1\line
\line
/*---------------------------------------------.\line
| `tar' Header Block, from POSIX 1003.1-1990.  |\line
`---------------------------------------------*/\line
\line
/* POSIX header.  */\line
\line
struct posix_header\line
\'7B                               /* byte offset */\line
  char name[100];               /*   0 */\line
  char mode[8];                 /* 100 */\line
  char uid[8];                  /* 108 */\line
  char gid[8];                  /* 116 */\line
  char size[12];                /* 124 */\line
  char mtime[12];               /* 136 */\line
  char chksum[8];               /* 148 */\line
  char typeflag;                /* 156 */\line
  char linkname[100];           /* 157 */\line
  char magic[6];                /* 257 */\line
  char version[2];              /* 263 */\line
  char uname[32];               /* 265 */\line
  char gname[32];               /* 297 */\line
  char devmajor[8];             /* 329 */\line
  char devminor[8];             /* 337 */\line
  char prefix[155];             /* 345 */\line
                                /* 500 */\line
\'7D;\line
\line
#define TMAGIC   "ustar"        /* ustar and a null */\line
#define TMAGLEN  6\line
#define TVERSION "00"           /* 00 and no null */\line
#define TVERSLEN 2\line
\line
/* Values used in typeflag field.  */\line
#define REGTYPE  '0'            /* regular file */\line
#define AREGTYPE '\'5C0'           /* regular file */\line
#define LNKTYPE  '1'            /* link */\line
#define SYMTYPE  '2'            /* reserved */\line
#define CHRTYPE  '3'            /* character special */\line
#define BLKTYPE  '4'            /* block special */\line
#define DIRTYPE  '5'            /* directory */\line
#define FIFOTYPE '6'            /* FIFO special */\line
#define CONTTYPE '7'            /* reserved */\line
\line
/* Bits used in the mode field, values in octal.  */\line
#define TSUID    04000          /* set UID on execution */\line
#define TSGID    02000          /* set GID on execution */\line
#define TSVTX    01000          /* reserved */\line
                                /* file permissions */\line
#define TUREAD   00400          /* read by owner */\line
#define TUWRITE  00200          /* write by owner */\line
#define TUEXEC   00100          /* execute/search by owner */\line
#define TGREAD   00040          /* read by group */\line
#define TGWRITE  00020          /* write by group */\line
#define TGEXEC   00010          /* execute/search by group */\line
#define TOREAD   00004          /* read by other */\line
#define TOWRITE  00002          /* write by other */\line
#define TOEXEC   00001          /* execute/search by other */\line
\line
/*-------------------------------------.\line
| `tar' Header Block, GNU extensions.  |\line
`-------------------------------------*/\line
\line
/* In GNU tar, SYMTYPE is for to symbolic links, and CONTTYPE is for\line
   contiguous files, so maybe disobeying the `reserved' comment in POSIX\line
   header description.  I suspect these were meant to be used this way, and\line
   should not have really been `reserved' in the published standards.  */\line
\line
/* *BEWARE* *BEWARE* *BEWARE* that the following information is still\line
   boiling, and may change.  Even if the OLDGNU format description should be\line
   accurate, the so-called GNU format is not yet fully decided.  It is\line
   surely meant to use only extensions allowed by POSIX, but the sketch\line
   below repeats some ugliness from the OLDGNU format, which should rather\line
   go away.  Sparse files should be saved in such a way that they do *not*\line
   require two passes at archive creation time.  Huge files get some POSIX\line
   fields to overflow, alternate solutions have to be sought for this.  */\line
\line
/* Descriptor for a single file hole.  */\line
\line
struct sparse\line
\'7B                               /* byte offset */\line
  char offset[12];              /*   0 */\line
  char numbytes[12];            /*  12 */\line
                                /*  24 */\line
\'7D;\line
\line
/* Sparse files are not supported in POSIX ustar format.  For sparse files\line
   with a POSIX header, a GNU extra header is provided which holds overall\line
   sparse information and a few sparse descriptors.  When an old GNU header\line
   replaces both the POSIX header and the GNU extra header, it holds some\line
   sparse descriptors too.  Whether POSIX or not, if more sparse descriptors\line
   are still needed, they are put into as many successive sparse headers as\line
   necessary.  The following constants tell how many sparse descriptors fit\line
   in each kind of header able to hold them.  */\line
\line
#define SPARSES_IN_EXTRA_HEADER  16\line
#define SPARSES_IN_OLDGNU_HEADER 4\line
#define SPARSES_IN_SPARSE_HEADER 21\line
\line
/* The GNU extra header contains some information GNU tar needs, but not\line
   foreseen in POSIX header format.  It is only used after a POSIX header\line
   (and never with old GNU headers), and immediately follows this POSIX\line
   header, when typeflag is a letter rather than a digit, so signaling a GNU\line
   extension.  */\line
\line
struct extra_header\line
\'7B                               /* byte offset */\line
  char atime[12];               /*   0 */\line
  char ctime[12];               /*  12 */\line
  char offset[12];              /*  24 */\line
  char realsize[12];            /*  36 */\line
  char longnames[4];            /*  48 */\line
  char unused_pad1[68];         /*  52 */\line
  struct sparse sp[SPARSES_IN_EXTRA_HEADER];\line
                                /* 120 */\line
  char isextended;              /* 504 */\line
                                /* 505 */\line
\'7D;\line
\line
/* Extension header for sparse files, used immediately after the GNU extra\line
   header, and used only if all sparse information cannot fit into that\line
   extra header.  There might even be many such extension headers, one after\line
   the other, until all sparse information has been recorded.  */\line
\line
struct sparse_header\line
\'7B                               /* byte offset */\line
  struct sparse sp[SPARSES_IN_SPARSE_HEADER];\line
                                /*   0 */\line
  char isextended;              /* 504 */\line
                                /* 505 */\line
\'7D;\line
\line
/* The old GNU format header conflicts with POSIX format in such a way that\line
   POSIX archives may fool old GNU tar's, and POSIX tar's might well be\line
   fooled by old GNU tar archives.  An old GNU format header uses the space\line
   used by the prefix field in a POSIX header, and cumulates information\line
   normally found in a GNU extra header.  With an old GNU tar header, we\line
   never see any POSIX header nor GNU extra header.  Supplementary sparse\line
   headers are allowed, however.  */\line
\line
struct oldgnu_header\line
\'7B                               /* byte offset */\line
  char unused_pad1[345];        /*   0 */\line
  char atime[12];               /* 345 */\line
  char ctime[12];               /* 357 */\line
  char offset[12];              /* 369 */\line
  char longnames[4];            /* 381 */\line
  char unused_pad2;             /* 385 */\line
  struct sparse sp[SPARSES_IN_OLDGNU_HEADER];\line
                                /* 386 */\line
  char isextended;              /* 482 */\line
  char realsize[12];            /* 483 */\line
                                /* 495 */\line
\'7D;\line
\line
/* OLDGNU_MAGIC uses both magic and version fields, which are contiguous.\line
   Found in an archive, it indicates an old GNU header format, which will be\line
   hopefully become obsolescent.  With OLDGNU_MAGIC, uname and gname are\line
   valid, though the header is not truly POSIX conforming.  */\line
#define OLDGNU_MAGIC "ustar  "  /* 7 chars and a null */\line
\line
/* The standards committee allows only capital A through capital Z for\line
   user-defined expansion.  */\line
\line
/* This is a dir entry that contains the names of files that were in the\line
   dir at the time the dump was made.  */\line
#define GNUTYPE_DUMPDIR 'D'\line
\line
/* Identifies the *next* file on the tape as having a long linkname.  */\line
#define GNUTYPE_LONGLINK 'K'\line
\line
/* Identifies the *next* file on the tape as having a long name.  */\line
#define GNUTYPE_LONGNAME 'L'\line
\line
/* This is the continuation of a file that began on another volume.  */\line
#define GNUTYPE_MULTIVOL 'M'\line
\line
/* For storing filenames that do not fit into the main header.  */\line
#define GNUTYPE_NAMES 'N'\line
\line
/* This is for sparse files.  */\line
#define GNUTYPE_SPARSE 'S'\line
\line
/* This file is a tape/volume header.  Ignore it on extraction.  */\line
#define GNUTYPE_VOLHDR 'V'\line
\line
/*--------------------------------------.\line
| tar Header Block, overall structure.  |\line
`--------------------------------------*/\line
\line
/* tar files are made in basic blocks of this size.  */\line
#define BLOCKSIZE 512\line
\line
enum archive_format\line
\'7B\line
  DEFAULT_FORMAT,               /* format to be decided later */\line
  V7_FORMAT,                    /* old V7 tar format */\line
  OLDGNU_FORMAT,                /* GNU format as per before tar 1.12 */\line
  POSIX_FORMAT,                 /* restricted, pure POSIX format */\line
  GNU_FORMAT                    /* POSIX format with GNU extensions */\line
\'7D;\line
\line
union block\line
\'7B\line
  char buffer[BLOCKSIZE];\line
  struct posix_header header;\line
  struct extra_header extra_header;\line
  struct oldgnu_header oldgnu_header;\line
  struct sparse_header sparse_header;\line
\'7D;\line
\line
/* End of Format description.  */\par
\pard\f0{}}\par
\pard{}All characters in header blocks are represented by using 8-bit characters in the local variant of ASCII.  Each field within the structure is contiguous; that is, there is no padding used within the structure.  Each character on the archive medium is stored contiguously.\par
\par
\pard{}Bytes representing the contents of files (after the header block of each file) are not translated in any way and are not constrained to represent characters in any character set.  The {\f1{}tar} format does not distinguish text files from binary files, and no translation of file contents is performed.\par
\par
\pard{}The {\f1{}name}, {\f1{}linkname}, {\f1{}magic}, {\f1{}uname}, and {\f1{}gname} are null-terminated character strings.  All other fileds are zero-filled octal numbers in ASCII.  Each numeric field of width {\i w} contains {\i w} minus 2 digits, a space, and a null, except {\f1{}size}, and {\f1{}mtime}, which do not contain the trailing null.\par
\par
\pard{}The {\f1{}name} field is the file name of the file, with directory names (if any) preceding the file name, separated by slashes.\par
\par
\pard{}The {\f1{}mode} field provides nine bits specifying file permissions and three bits to specify the Set UID, Set GID, and Save Text (\'A2sticky\'A2) modes.  Values for these bits are defined above.  When special permissions are required to create a file with a given mode, and the user restoring files from the archive does not hold such permissions, the mode bit(s) specifying those special permissions are ignored.  Modes which are not supported by the operating system restoring files from the archive will be ignored.  Unsupported modes should be faked up when creating or updating an archive; e.g. the group permission could be copied from the {\i other} permission.\par
\par
\pard{}The {\f1{}uid} and {\f1{}gid} fields are the numeric user and group ID of the file owners, respectively.  If the operating system does not support numeric user or group IDs, these fields should be ignored.\par
\par
\pard{}The {\f1{}size} field is the size of the file in bytes; linked files are archived with this field specified as zero.  , in particular the {\f1{}--incremental} ({\f1{}-G}) option.\par
\par
\pard{}The {\f1{}mtime} field is the modification time of the file at the time it was archived.  It is the ASCII representation of the octal value of the last time the file was modified, represented as an integer number of seconds since January 1, 1970, 00:00 Coordinated Universal Time.\par
\par
\pard{}The {\f1{}chksum} field is the ASCII representation of the octal value of the simple sum of all bytes in the header block.  Each 8-bit byte in the header is added to an unsigned integer, initialized to zero, the precision of which shall be no less than seventeen bits.  When calculating the checksum, the {\f1{}chksum} field is treated as if it were all blanks.\par
\par
\pard{}The {\f1{}typeflag} field specifies the type of file archived.  If a particular implementation does not recognize or permit the specified type, the file will be extracted as if it were a regular file.  As this action occurs, {\f1{}tar} issues a warning to the standard error.\par
\par
\pard{}The {\f1{}atime} and {\f1{}ctime} fields are used in making incremental backups; they store, respectively, the particular file's access time and last inode-change time.\par
\par
\pard{}The {\f1{}offset} is used by the {\f1{}--multi-volume} ({\f1{}-M}) option, when making a multi-volume archive.  The offset is number of bytes into the file that we need to restart at to continue the file on the next tape, i.e., where we store the location that a continued file is continued at.\par
\par
\pard{}The following fields were added to deal with sparse files.  A file is \'A2sparse\'A2 if it takes in unallocated blocks which end up being represented as zeros, i.e., no useful data.  A test to see if a file is sparse is to look at the number blocks allocated for it versus the number of characters in the file; if there are fewer blocks allocated for the file than would normally be allocated for a file of that size, then the file is sparse.  This is the method {\f1{}tar} uses to detect a sparse file, and once such a file is detected, it is treated differently from non-sparse files.\par
\par
\pard{}Sparse files are often {\f1{}dbm} files, or other database-type files which have data at some points and emptiness in the greater part of the file.  Such files can appear to be very large when an {\f1{}ls -l} is done on them, when in truth, there may be a very small amount of important data contained in the file.  It is thus undesirable to have {\f1{}tar} think that it must back up this entire file, as great quantities of room are wasted on empty blocks, which can lead to running out of room on a tape far earlier than is necessary.  Thus, sparse files are dealt with so that these empty blocks are not written to the tape.  Instead, what is written to the tape is a description, of sorts, of the sparse file: where the holes are, how big the holes are, and how much data is found at the end of the hole.  This way, the file takes up potentially far less room on the tape, and when the file is extracted later on, it will look exactly the way it looked beforehand.  The following is a description of the fields used to handle a sparse file:\par
\par
\pard{}The {\f1{}sp} is an array of {\f1{}struct sparse}.  Each {\f1{}struct sparse} contains two 12-character strings which represent an offset into the file and a number of bytes to be written at that offset.  The offset is absolute, and not relative to the offset in preceding array element.\par
\par
\pard{}The header can hold four of these {\f1{}struct sparse} at the moment; if more are needed, they are not stored in the header.\par
\par
\pard{}The {\f1{}isextended} flag is set when an {\f1{}extended_header} is needed to deal with a file.  Note that this means that this flag can only be set when dealing with a sparse file, and it is only set in the event that the description of the file will not fit in the alloted room for sparse structures in the header.  In other words, an extended_header is needed.\par
\par
\pard{}The {\f1{}extended_header} structure is used for sparse files which need more sparse structures than can fit in the header.  The header can fit 4 such structures; if more are needed, the flag {\f1{}isextended} gets set and the next block is an {\f1{}extended_header}.\par
\par
\pard{}Each {\f1{}extended_header} structure contains an array of 21 sparse structures, along with a similar {\f1{}isextended} flag that the header had.  There can be an indeterminate number of such {\f1{}extended_header}s to describe a sparse file.\par
\par
{\pard{}{\f1{}REGTYPE}\par
\pard{}{\f1{}AREGTYPE}\par
\pard\li720{}These flags represent a regular file.  In order to be compatible with older versions of {\f1{}tar}, a {\f1{}typeflag} value of {\f1{}AREGTYPE} should be silently recognized as a regular file.  New archives should be created using {\f1{}REGTYPE}.  Also, for backward compatibility, {\f1{}tar} treats a regular file whose name ends with a slash as a directory.\par
\par
\pard{}{\f1{}LNKTYPE}\par
\pard\li720{}This flag represents a file linked to another file, of any type, previously archived.  Such files are identified in Unix by each file having the same device and inode number.  The linked-to name is specified in the {\f1{}linkname} field with a trailing null.\par
\par
\pard{}{\f1{}SYMTYPE}\par
\pard\li720{}This represents a symbolic link to another file.  The linked-to name is specified in the {\f1{}linkname} field with a trailing null.\par
\par
\pard{}{\f1{}CHRTYPE}\par
\pard{}{\f1{}BLKTYPE}\par
\pard\li720{}These represent character special files and block special files respectively.  In this case the {\f1{}devmajor} and {\f1{}devminor} fields will contain the major and minor device numbers respectively.  Operating systems may map the device specifications to their own local specification, or may ignore the entry.\par
\par
\pard{}{\f1{}DIRTYPE}\par
\pard\li720{}This flag specifies a directory or sub-directory.  The directory name in the {\f1{}name} field should end with a slash.  On systems where disk allocation is performed on a directory basis, the {\f1{}size} field will contain the maximum number of bytes (which may be rounded to the nearest disk block allocation unit) which the directory may hold.  A {\f1{}size} field of zero indicates no such limiting.  Systems which do not support limiting in this manner should ignore the {\f1{}size} field.\par
\par
\pard{}{\f1{}FIFOTYPE}\par
\pard\li720{}This specifies a FIFO special file.  Note that the archiving of a FIFO file archives the existence of this file and not its contents.\par
\par
\pard{}{\f1{}CONTTYPE}\par
\pard\li720{}This specifies a contiguous file, which is the same as a normal file except that, in operating systems which support it, all its space is allocated contiguously on the disk.  Operating systems which do not allow contiguous allocation should silently treat this type as a normal file.\par
\par
\pard{}{\f1{}A} ... {\f1{}Z}\par
\pard\li720{}These are reserved for custom implementations.  Some of these are used in the GNU modified format, as described below.\par
\par
\pard{}}\par
\pard{}Other values are reserved for specification in future revisions of the P1003 standard, and should not be used by any {\f1{}tar} program.\par
\par
\pard{}The {\f1{}magic} field indicates that this archive was output in the P1003 archive format.  If this field contains {\f1{}TMAGIC}, the {\f1{}uname} and {\f1{}gname} fields will contain the ASCII representation of the owner and group of the file respectively.  If found, the user and group IDs are used rather than the values in the {\f1{}uid} and {\f1{}gid} fields.\par
\par
\pard{}For references, see ISO/IEC 9945-1:1990 or IEEE Std 1003.1-1990, pages 169-173 (section 10.1) for {\i Archive/Interchange File Format}; and IEEE Std 1003.2-1992, pages 380-388 (section 4.48) and pages 936-940 (section E.4.48) for {\i pax - Portable archive interchange}.\par
\par
\page\pard Node: {\b Extensions}, \keepn Next: {\uldb cpio}{\v cpio}, Prev: {\uldb Standard}{\v Standard}, Up: {\uldb Formats}{\v Formats}\line
K{\footnote K Extensions}
#{\footnote Extensions}
${\footnote \pard{}GNU Extensions to the Archive Format}\par
\pard{\fs24\b GNU Extensions to the Archive Format}\par
\par
{{{\i \pard\li720{}(This message will disappear, once this node revised.)}\par
\pard{}}}\par
\pard{}The GNU format uses additional file types to describe new types of files in an archive.  These are listed below.\par
\par
{\pard{}{\f1{}GNUTYPE_DUMPDIR}\par
\pard{}{\f1{}'D'}\par
\pard\li720{}This represents a directory and a list of files created by the {\f1{}--incremental} ({\f1{}-G}) option.  The {\f1{}size} field gives the total size of the associated list of files.  Each file name is preceded by either a {\f1{}Y} (the file should be in this archive) or an {\f1{}N}.  (The file is a directory, or is not stored in the archive.)  Each file name is terminated by a null.  There is an additional null after the last file name.\par
\par
\pard{}{\f1{}GNUTYPE_MULTIVOL}\par
\pard{}{\f1{}'M'}\par
\pard\li720{}This represents a file continued from another volume of a multi-volume archive created with the {\f1{}--multi-volume} ({\f1{}-M}) option.  The original type of the file is not given here.  The {\f1{}size} field gives the maximum size of this piece of the file (assuming the volume does not end before the file is written out).  The {\f1{}offset} field gives the offset from the beginning of the file where this part of the file begins.  Thus {\f1{}size} plus {\f1{}offset} should equal the original size of the file.\par
\par
\pard{}{\f1{}GNUTYPE_SPARSE}\par
\pard{}{\f1{}'S'}\par
\pard\li720{}This flag indicates that we are dealing with a sparse file.  Note that archiving a sparse file requires special operations to find holes in the file, which mark the positions of these holes, along with the number of bytes of data to be found after the hole.\par
\par
\pard{}{\f1{}GNUTYPE_VOLHDR}\par
\pard{}{\f1{}'V'}\par
\pard\li720{}This file type is used to mark the volume header that was given with the {\f1{}--label={\i archive-label}} ({\f1{}-V {\i archive-label}}) option when the archive was created.  The {\f1{}name} field contains the {\f1{}name} given after the {\f1{}--label={\i archive-label}} ({\f1{}-V {\i archive-label}}) option.  The {\f1{}size} field is zero.  Only the first file in each volume of an archive should have this type.\par
\par
\pard{}}\par
\pard{}You may have trouble reading a GNU format archive on a non-GNU system if the options {\f1{}--incremental} ({\f1{}-G}), {\f1{}--multi-volume} ({\f1{}-M}), {\f1{}--sparse} ({\f1{}-S}), or {\f1{}--label={\i archive-label}} ({\f1{}-V {\i archive-label}}) were used when writing the archive.  In general, if {\f1{}tar} does not use the GNU-added fields of the header, other versions of {\f1{}tar} should be able to read the archive.  Otherwise, the {\f1{}tar} program will give an error, the most likely one being a checksum error.\par
\par
\page\pard Node: {\b cpio}, \keepn Next: {\uldb }{\v }, Prev: {\uldb Extensions}{\v Extensions}, Up: {\uldb Formats}{\v Formats}\line
K{\footnote K cpio}
#{\footnote cpio}
${\footnote \pard{}Comparison of {\f1{}tar} and {\f1{}cpio}}\par
\pard{\fs24\b Comparison of {\f1{}tar} and {\f1{}cpio}}\par
\par
{{{\i \pard\li720{}(This message will disappear, once this node revised.)}\par
\pard{}}}\par
\pard{}The {\f1{}cpio} archive formats, like {\f1{}tar}, do have maximum pathname lengths.  The binary and old ASCII formats have a max path length of 256, and the new ASCII and CRC ASCII formats have a max path length of 1024.  GNU {\f1{}cpio} can read and write archives with arbitrary pathname lengths, but other {\f1{}cpio} implementations may crash unexplainedly trying to read them.\par
\par
{\f1{}\pard{}tar} handles symbolic links in the form in which it comes in BSD; {\f1{}cpio} doesn't handle symbolic links in the form in which it comes in System V prior to SVR4, and some vendors may have added symlinks to their system without enhancing {\f1{}cpio} to know about them.  Others may have enhanced it in a way other than the way I did it at Sun, and which was adopted by AT&T (and which is, I think, also present in the {\f1{}cpio} that Berkeley picked up from AT&T and put into a later BSD release--I think I gave them my changes).\par
\par
\pard{}(SVR4 does some funny stuff with {\f1{}tar}; basically, its {\f1{}cpio} can handle {\f1{}tar} format input, and write it on output, and it probably handles symbolic links.  They may not have bothered doing anything to enhance {\f1{}tar} as a result.)\par
\par
{\f1{}\pard{}cpio} handles special files; traditional {\f1{}tar} doesn't.\par
\par
{\f1{}\pard{}tar} comes with V7, System III, System V, and BSD source; {\f1{}cpio} comes only with System III, System V, and later BSD (4.3-tahoe and later).\par
\par
{\f1{}\pard{}tar}'s way of handling multiple hard links to a file can handle file systems that support 32-bit inumbers (e.g., the BSD file system); {\f1{}cpio}s way requires you to play some games (in its "binary" format, i-numbers are only 16 bits, and in its "portable ASCII" format, they're 18 bits--it would have to play games with the "file system ID" field of the header to make sure that the file system ID/i-number pairs of different files were always different), and I don't know which {\f1{}cpio}s, if any, play those games.  Those that don't might get confused and think two files are the same file when they're not, and make hard links between them.\par
\par
{\f1{}\pard{}tar}s way of handling multiple hard links to a file places only one copy of the link on the tape, but the name attached to that copy is the {\i only} one you can use to retrieve the file; {\f1{}cpio}s way puts one copy for every link, but you can retrieve it using any of the names.\par
\par
{\pard\li720{}What type of check sum (if any) is used, and how is this calculated.\par
\pard{}}\par
\pard{}See the attached manual pages for {\f1{}tar} and {\f1{}cpio} format.  {\f1{}tar} uses a checksum which is the sum of all the bytes in the {\f1{}tar} header for a file; {\f1{}cpio} uses no checksum.\par
\par
{\pard\li720{}If anyone knows why {\f1{}cpio} was made when {\f1{}tar} was present at the unix scene,\par
\pard{}}\par
\pard{}It wasn't.  {\f1{}cpio} first showed up in PWB/UNIX 1.0; no generally-available version of UNIX had {\f1{}tar} at the time.  I don't know whether any version that was generally available {\i within AT&T} had {\f1{}tar}, or, if so, whether the people within AT&T who did {\f1{}cpio} knew about it.\par
\par
\pard{}On restore, if there is a corruption on a tape {\f1{}tar} will stop at that point, while {\f1{}cpio} will skip over it and try to restore the rest of the files.\par
\par
\pard{}The main difference is just in the command syntax and header format.\par
\par
{\f1{}\pard{}tar} is a little more tape-oriented in that everything is blocked to start on a record boundary.\par
\par
{\pard\li720{}Is there any differences between the ability to recover crashed archives between the two of them. (Is there any chance of recovering crashed archives at all.)\par
\pard{}}\par
\pard{}Theoretically it should be easier under {\f1{}tar} since the blocking lets you find a header with some variation of {\f1{}dd skip={\i nn}}.  However, modern {\f1{}cpio}'s and variations have an option to just search for the next file header after an error with a reasonable chance of re-syncing.  However, lots of tape driver software won't allow you to continue past a media error which should be the only reason for getting out of sync unless a file changed sizes while you were writing the archive.\par
\par
{\pard\li720{}If anyone knows why {\f1{}cpio} was made when {\f1{}tar} was present at the unix scene, please tell me about this too.\par
\pard{}}\par
\pard{}Probably because it is more media efficient (by not blocking everything and using only the space needed for the headers where {\f1{}tar} always uses 512 bytes per file header) and it knows how to archive special files.\par
\par
\pard{}You might want to look at the freely available alternatives.  The major ones are {\f1{}afio}, GNU {\f1{}tar}, and {\f1{}pax}, each of which have their own extensions with some backwards compatibility.\par
\par
\pard{}Sparse files were {\f1{}tar}red as sparse files (which you can easily test, because the resulting archive gets smaller, and GNU {\f1{}cpio} can no longer read it).\par
\par
\page\pard Node: {\b Media}, \keepn Next: {\uldb Index}{\v Index}, Prev: {\uldb Formats}{\v Formats}, Up: {\uldb Top}{\v Top}\line
K{\footnote K Media}
#{\footnote Media}
${\footnote \pard{}Tapes and Other Archive Media}\par
\pard{\fs24\b Tapes and Other Archive Media}\par
\par
{{{\i \pard\li720{}(This message will disappear, once this node revised.)}\par
\pard{}}}\par
\pard{}A few special cases about tape handling warrant more detailed description.  These special cases are discussed below.\par
\par
\pard{}Many complexities surround the use of {\f1{}tar} on tape drives.  Since the creation and manipulation of archives located on magnetic tape was the original purpose of {\f1{}tar}, it contains many features making such manipulation easier.\par
\par
\pard{}Archives are usually written on dismountable media--tape cartridges, mag tapes, or floppy disks.\par
\par
\pard{}The amount of data a tape or disk holds depends not only on its size, but also on how it is formatted.  A 2400 foot long reel of mag tape holds 40 megabytes of data when formated at 1600 bits per inch.  The physically smaller EXABYTE tape cartridge holds 2.3 gigabytes.\par
\par
\pard{}Magnetic media are re-usable--once the archive on a tape is no longer needed, the archive can be erased and the tape or disk used over.  Media quality does deteriorate with use, however.  Most tapes or disks should be disgarded when they begin to produce data errors.  EXABYTE tape cartridges should be disgarded when they generate an \'A2error count\'A2 (number of non-usable bits) of more than 10k.\par
\par
\pard{}Magnetic media are written and erased using magnetic fields, and should be protected from such fields to avoid damage to stored data.  Sticking a floppy disk to a filing cabinet using a magnet is probably not a good idea.\par
\par
{\par
\pard\keep\fi-2880\li2880\tx2880{}{\uldb Device}{\v Device}\tab Device selection and switching\par
{\uldb Remote Tape Server}{\v Remote_Tape_Server}\tab \par
{\uldb Common Problems and Solutions}{\v Common_Problems_and_Solutions}\tab \par
{\uldb Blocking}{\v Blocking}\tab Blocking\par
{\uldb Many}{\v Many}\tab Many archives on one tape\par
{\uldb Using Multiple Tapes}{\v Using_Multiple_Tapes}\tab Using Multiple Tapes\par
{\uldb label}{\v label}\tab Including a Label in the Archive\par
{\uldb verify}{\v verify}\tab \par
{\uldb Write Protection}{\v Write_Protection}\tab\par
\pard{}}\par
\page\pard Node: {\b Device}, \keepn Next: {\uldb Remote Tape Server}{\v Remote_Tape_Server}, Prev: {\uldb Media}{\v Media}, Up: {\uldb Media}{\v Media}\line
K{\footnote K Device}
#{\footnote Device}
${\footnote \pard{}Device Selection and Switching}\par
\pard{\fs24\b Device Selection and Switching}\par
\par
{{{\i \pard\li720{}(This message will disappear, once this node revised.)}\par
\pard{}}}\par
{\pard{}{\f1{}-f [{\i hostname}:]{\i file}}\par
\pard{}{\f1{}--file=[{\i hostname}:]{\i file}}\par
\pard\li720{}Use archive file or device {\i file} on {\i hostname}.\par
\pard{}}\par
\pard{}This option is used to specify the file name of the archive {\f1{}tar} works on.\par
\par
\pard{}If the file name is {\f1{}-}, {\f1{}tar} reads the archive from standard input (when listing or extracting), or writes it to standard output (when creating).  If the {\f1{}-} file name is given when updating an archive, {\f1{}tar} will read the original archive from its standard input, and will write the entire new archive to its standard output.\par
\par
\pard{}If the file name contains a {\f1{}:}, it is interpreted as {\f1{}hostname:file name}.  If the {\i hostname} contains an \'A2at\'A2 sign ({\f1{}@}), it is treated as {\f1{}user@hostname:file name}.  In either case, {\f1{}tar} will invoke the command {\f1{}rsh} (or {\f1{}remsh}) to start up an {\f1{}/etc/rmt} on the remote machine.  If you give an alternate login name, it will be given to the {\f1{}rsh}.  Naturally, the remote machine must have an executable {\f1{}/etc/rmt}.  This program is free software from the University of California, and a copy of the source code can be found with the sources for {\f1{}tar}; it's compiled and installed by default.\par
\par
\pard{}If this option is not given, but the environment variable {\f1{}TAPE} is set, its value is used; otherwise, old versions of {\f1{}tar} used a default archive name (which was picked when {\f1{}tar} was compiled).  The default is normally set up to be the \'A2first\'A2 tape drive or other transportable I/O medium on the system.\par
\par
\pard{}Starting with version 1.11.5, GNU {\f1{}tar} uses standard input and standard output as the default device, and I will not try anymore supporting automatic device detection at installation time.  This was failing really in too many cases, it was hopeless.  This is now completely left to the installer to override standard input and standard output for default device, if this seems preferrable to him/her.  Further, I think {\i most} actual usages of {\f1{}tar} are done with pipes or disks, not really tapes, cartridges or diskettes.\par
\par
\pard{}Some users think that using standard input and output is running after trouble.  This could lead to a nasty surprise on your screen if you forget to specify an output file name--especially if you are going through a network or terminal server capable of buffering large amounts of output.  We had so many bug reports in that area of configuring default tapes automatically, and so many contradicting requests, that we finally consider the problem to be portably intractable.  We could of course use something like {\f1{}/dev/tape} as a default, but this is {\i also} running after various kind of trouble, going from hung processes to accidental destruction of real tapes.  After having seen all this mess, using standard input and output as a default really sounds like the only clean choice left, and a very useful one too.\par
\par
\pard{}GNU {\f1{}tar} reads and writes archive in records, I suspect this is the main reason why block devices are preferred over character devices.  Most probably, block devices are more efficient too.  The installer could also check for {\f1{}DEFTAPE} in {\f1{}<sys/mtio.h>}.\par
\par
{\pard{}{\f1{}--force-local}\par
\pard\li720{}Archive file is local even if it contains a colon.\par
\par
\pard{}{\f1{}--rsh-command={\i command}}\par
\pard\li720{}Use remote {\i command} instead of {\f1{}rsh}.  This option exists so that people who use something other than the standard {\f1{}rsh} (e.g., a Kerberized {\f1{}rsh}) can access a remote device.\par
\par
\pard\li720{}When this command is not used, the shell command found when the {\f1{}tar} program was installed is used instead.  This is the first found of {\f1{}/usr/ucb/rsh}, {\f1{}/usr/bin/remsh}, {\f1{}/usr/bin/rsh}, {\f1{}/usr/bsd/rsh} or {\f1{}/usr/bin/nsh}.  The installer may have overriden this by defining the environment variable {\f1{}RSH} {\i at installation time}.\par
\par
\pard{}{\f1{}-[0-7][lmh]}\par
\pard\li720{}Specify drive and density.\par
\par
\pard{}{\f1{}-M}\par
\pard{}{\f1{}--multi-volume}\par
\pard\li720{}Create/list/extract multi-volume archive.\par
\par
\pard\li720{}This option causes {\f1{}tar} to write a \'A2multi-volume\'A2 archive--one that may be larger than will fit on the medium used to hold it.  See {\uldb Multi-Volume Archives}{\v Multi_Volume_Archives}.\par
\par
\pard{}{\f1{}-L {\i num}}\par
\pard{}{\f1{}--tape-length={\i num}}\par
\pard\li720{}Change tape after writing {\i num} x 1024 bytes.\par
\par
\pard\li720{}This option might be useful when your tape drivers do not properly detect end of physical tapes.  By being slightly conservative on the maximum tape length, you might avoid the problem entirely.\par
\par
\pard{}{\f1{}-F {\i file}}\par
\pard{}{\f1{}--info-script={\i file}}\par
\pard{}{\f1{}--new-volume-script={\i file}}\par
\pard\li720{}Execute {\f1{}file} at end of each tape.  This implies {\f1{}--multi-volume} ({\f1{}-M}).\par
\pard{}}\par
\page\pard Node: {\b Remote Tape Server}, \keepn Next: {\uldb Common Problems and Solutions}{\v Common_Problems_and_Solutions}, Prev: {\uldb Device}{\v Device}, Up: {\uldb Media}{\v Media}\line
K{\footnote K Remote Tape Server}
#{\footnote Remote_Tape_Server}
${\footnote \pard{}The Remote Tape Server}\par
\pard{\fs24\b The Remote Tape Server}\par
\par
\pard{}{K{\footnote K remote tape drive}}{K{\footnote K rmt}}In order to access the tape drive on a remote machine, {\f1{}tar} uses the remote tape server written at the University of California at Berkeley.  The remote tape server must be installed as {\f1{}/etc/rmt} on any machine whose tape drive you want to use.  {\f1{}tar} calls {\f1{}/etc/rmt} by running an {\f1{}rsh} or {\f1{}remsh} to the remote machine, optionally using a different login name if one is supplied.\par
\par
\pard{}A copy of the source for the remote tape server is provided.  It is Copyright (C) 1983 by the Regents of the University of California, but can be freely distributed.  Instructions for compiling and installing it are included in the {\f1{}Makefile}.\par
\par
\pard{}{K{\footnote K absolute file names}}Unless you use the {\f1{}--absolute-names} ({\f1{}-P}) option, GNU {\f1{}tar} will not allow you to create an archive that contains absolute file names (a file name beginning with {\f1{}/}.) If you try, {\f1{}tar} will automatically remove the leading {\f1{}/} from the file names it stores in the archive.  It will also type a warning message telling you what it is doing.\par
\par
\pard{}When reading an archive that was created with a different {\f1{}tar} program, GNU {\f1{}tar} automatically extracts entries in the archive which have absolute file names as if the file names were not absolute.  This is an important feature.  A visitor here once gave a {\f1{}tar} tape to an operator to restore; the operator used Sun {\f1{}tar} instead of GNU {\f1{}tar}, and the result was that it replaced large portions of our {\f1{}/bin} and friends with versions from the tape; needless to say, we were unhappy about having to recover the file system from backup tapes.\par
\par
\pard{}For example, if the archive contained a file {\f1{}/usr/bin/computoy}, GNU {\f1{}tar} would extract the file to {\f1{}usr/bin/computoy}, relative to the current directory.  If you want to extract the files in an archive to the same absolute names that they had when the archive was created, you should do a {\f1{}cd /} before extracting the files from the archive, or you should either use the {\f1{}--absolute-names} ({\f1{}-P}) option, or use the command {\f1{}tar -C / ...}.\par
\par
\pard{}{K{\footnote K Ultrix 3.1 and write failure}}Some versions of Unix (Ultrix 3.1 is know to have this problem), can claim that a short write near the end of a tape succeeded, when it actually failed.  This will result in the -M option not working correctly.  The best workaround at the moment is to use a significantly larger blocking factor than the default 20.\par
\par
\pard{}In order to update an archive, {\f1{}tar} must be able to backspace the archive in order to reread or rewrite a record that was just read (or written).  This is currently possible only on two kinds of files: normal disk files (or any other file that can be backspaced with {\f1{}lseek}), and industry-standard 9-track magnetic tape (or any other kind of tape that can be backspaced with the {\f1{}MTIOCTOP} {\f1{}ioctl}.\par
\par
\pard{}This means that the {\f1{}--append} ({\f1{}-r}), {\f1{}--update} ({\f1{}-u}), {\f1{}--concatenate} ({\f1{}--catenate}, {\f1{}-A}), and {\f1{}--delete} commands will not work on any other kind of file.  Some media simply cannot be backspaced, which means these commands and options will never be able to work on them.  These non-backspacing media include pipes and cartridge tape drives.\par
\par
\pard{}Some other media can be backspaced, and {\f1{}tar} will work on them once {\f1{}tar} is modified to do so.\par
\par
\pard{}Archives created with the {\f1{}--multi-volume} ({\f1{}-M}), {\f1{}--label={\i archive-label}} ({\f1{}-V {\i archive-label}}), and {\f1{}--incremental} ({\f1{}-G}) options may not be readable by other version of {\f1{}tar}.  In particular, restoring a file that was split over a volume boundary will require some careful work with {\f1{}dd}, if it can be done at all.  Other versions of {\f1{}tar} may also create an empty file whose name is that of the volume header.  Some versions of {\f1{}tar} may create normal files instead of directories archived with the {\f1{}--incremental} ({\f1{}-G}) option.\par
\par
\page\pard Node: {\b Common Problems and Solutions}, \keepn Next: {\uldb Blocking}{\v Blocking}, Prev: {\uldb Remote Tape Server}{\v Remote_Tape_Server}, Up: {\uldb Media}{\v Media}\line
K{\footnote K Common Problems and Solutions}
#{\footnote Common_Problems_and_Solutions}
${\footnote \pard{}Some Common Problems and their Solutions}\par
\pard{\fs24\b Some Common Problems and their Solutions}\par
\par
{{\pard\keep\f1{}errors from system:\line
permission denied\line
no such file or directory\line
not owner\line
\line
errors from {\f1{}tar}:\line
directory checksum error\line
header format error\line
\line
errors from media/system:\line
i/o error\line
device busy\par
\pard\f0{}}\par
}\page\pard Node: {\b Blocking}, \keepn Next: {\uldb Many}{\v Many}, Prev: {\uldb Common Problems and Solutions}{\v Common_Problems_and_Solutions}, Up: {\uldb Media}{\v Media}\line
K{\footnote K Blocking}
#{\footnote Blocking}
${\footnote \pard{}Blocking}\par
\pard{\fs24\b Blocking}\par
\par
{{{\i \pard\li720{}(This message will disappear, once this node revised.)}\par
\pard{}}}\par
\pard{}\'A2Block\'A2 and \'A2record\'A2 terminology is rather confused, and it is also confusing to the expert reader.  On the other hand, readers who are new to the field have a fresh mind, and they may safely skip the next two paragraphs, as the remainder of this manual uses those two terms in a quite consistent way.\par
\par
\pard{}John Gilmore, the writer of the public domain {\f1{}tar} from which GNU {\f1{}tar} was originally derived, wrote (June 1995):\par
\par
{\pard\li720{}The nomenclature of tape drives comes from IBM, where I believe they were invented for the IBM 650 or so.  On IBM mainframes, what is recorded on tape are tape blocks.  The logical organization of data is into records.  There are various ways of putting records into blocks, including {\f1{}F} (fixed sized records), {\f1{}V} (variable sized records), {\f1{}FB} (fixed blocked: fixed size records, {\i n} to a block), {\f1{}VB} (variable size records, {\i n} to a block), {\f1{}VSB} (variable spanned blocked: variable sized records that can occupy more than one block), etc.  The {\f1{}JCL} {\f1{}DD RECFORM=} parameter specified this to the operating system.\par
\par
\pard\li720{}The Unix man page on {\f1{}tar} was totally confused about this.  When I wrote {\f1{}PD TAR}, I used the historically correct terminology ({\f1{}tar} writes data records, which are grouped into blocks).  It appears that the bogus terminology made it into POSIX (no surprise here), and now Franc,ois has migrated that terminology back into the source code too.\par
\pard{}}\par
\pard{}The term \'A2physical block\'A2 means the basic transfer chunk from or to a device, after which reading or writing may stop without anything being lost.  In this manual, the term \'A2block\'A2 usually refers to a disk physical block, {\i assuming} that each disk block is 512 bytes in length.  It is true that some disk devices have different physical blocks, but {\f1{}tar} ignore these differences in its own format, which is meant to be portable, so a {\f1{}tar} block is always 512 bytes in length, and \'A2block\'A2 always mean a {\f1{}tar} block.  The term \'A2logical block\'A2 often represents the basic chunk of allocation of many disk blocks as a single entity, which the operating system treats somewhat atomically; this concept is only barely used in GNU {\f1{}tar}.\par
\par
\pard{}The term \'A2physical record\'A2 is another way to speak of a physical block, those two terms are somewhat interchangeable.  In this manual, the term \'A2record\'A2 usually refers to a tape physical block, {\i assuming} that the {\f1{}tar} archive is kept on magnetic tape.  It is true that archives may be put on disk or used with pipes, but nevertheless, {\f1{}tar} tries to read and write the archive one \'A2record\'A2 at a time, whatever the medium in use.  One record is made up of an integral number of blocks, and this operation of putting many disk blocks into a single tape block is called \'A2reblocking\'A2, or more simply, \'A2blocking\'A2.  The term \'A2logical record\'A2 refers to the logical organization of many characters into something meaningful to the application.  The term \'A2unit record\'A2 describes a small set of characters which are transmitted whole to or by the application, and often refers to a line of text.  Those two last terms are unrelated to what we call a \'A2record\'A2 in GNU {\f1{}tar}.\par
\par
\pard{}When writing to tapes, {\f1{}tar} writes the contents of the archive in chunks known as \'A2records\'A2.  To change the default blocking factor, use the {\f1{}--blocking-factor={\i 512-size}} ({\f1{}-b {\i 512-size}}) option.  Each record will then be composed of {\i 512-size} blocks.  (Each {\f1{}tar} block is 512 bytes.  See {\uldb Standard}{\v Standard}.)  Each file written to the archive uses at least one full record.  As a result, using a larger record size can result in more wasted space for small files.  On the other hand, a larger record size can often be read and written much more efficiently.\par
\par
\pard{}Further complicating the problem is that some tape drives ignore the blocking entirely.  For these, a larger record size can still improve performance (because the software layers above the tape drive still honor the blocking), but not as dramatically as on tape drives that honor blocking.\par
\par
\pard{}When reading an archive, {\f1{}tar} can usually figure out the record size on itself.  When this is the case, and a non-standard record size was used when the archive was created, {\f1{}tar} will print a message about a non-standard blocking factor, and then operate normally.  On some tape devices, however, {\f1{}tar} cannot figure out the record size itself.  On most of those, you can specify a blocking factor (with {\f1{}--blocking-factor={\i 512-size}} ({\f1{}-b {\i 512-size}})) larger than the actual blocking factor, and then use the {\f1{}--read-full-records} ({\f1{}-B}) option.  (If you specify a blocking factor with {\f1{}--blocking-factor={\i 512-size}} ({\f1{}-b {\i 512-size}}) and don't use the {\f1{}--read-full-records} ({\f1{}-B}) option, then {\f1{}tar} will not attempt to figure out the recording size itself.)  On some devices, you must always specify the record size exactly with {\f1{}--blocking-factor={\i 512-size}} ({\f1{}-b {\i 512-size}}) when reading, because {\f1{}tar} cannot figure it out.  In any case, use {\f1{}--list} ({\f1{}-t}) before doing any extractions to see whether {\f1{}tar} is reading the archive correctly.\par
\par
{\f1{}\pard{}tar} blocks are all fixed size (512 bytes), and its scheme for putting them into records is to put a whole number of them (one or more) into each record.  {\f1{}tar} records are all the same size; at the end of the file there's a block containing all zeros, which is how you tell that the remainder of the last record(s) are garbage.\par
\par
\pard{}In a standard {\f1{}tar} file (no options), the block size is 512 and the record size is 10240, for a blocking factor of 20.  What the {\f1{}--blocking-factor={\i 512-size}} ({\f1{}-b {\i 512-size}}) option does is sets the blocking factor, changing the record size while leaving the block size at 512 bytes.  20 was fine for ancient 800 or 1600 bpi reel-to-reel tape drives; most tape drives these days prefer much bigger records in order to stream and not waste tape.  When writing tapes for myself, some tend to use a factor of the order of 2048, say, giving a record size of around one megabyte.\par
\par
\pard{}If you use a blocking factor larger than 20, older {\f1{}tar} programs might not be able to read the archive, so we recommend this as a limit to use in practice.  GNU {\f1{}tar}, however, will support arbitrarily large record sizes, limited only by the amount of virtual memory or the physical characteristics of the tape device.\par
\par
{\par
\pard\keep\fi-2880\li2880\tx2880{}{\uldb Format Variations}{\v Format_Variations}\tab Format Variations\par
{\uldb Blocking Factor}{\v Blocking_Factor}\tab The Blocking Factor of an Archive\par
\pard{}}\par
\page\pard Node: {\b Format Variations}, \keepn Next: {\uldb Blocking Factor}{\v Blocking_Factor}, Prev: {\uldb Blocking}{\v Blocking}, Up: {\uldb Blocking}{\v Blocking}\line
K{\footnote K Format Variations}
#{\footnote Format_Variations}
${\footnote \pard{}Format Variations}\par
\pard{\fs24\b Format Variations}\par
\par
\pard{}{K{\footnote K Format Parameters}}{K{\footnote K Format Options}}{K{\footnote K Options, archive format specifying}}{K{\footnote K Options, format specifying}}{{\par
{\i \pard\li720{}(This message will disappear, once this node revised.)}\par
\pard{}}}\par
\pard{}Format parameters specify how an archive is written on the archive media.  The best choice of format parameters will vary depending on the type and number of files being archived, and on the media used to store the archive.\par
\par
\pard{}To specify format parameters when accessing or creating an archive, you can use the options described in the following sections.  If you do not specify any format parameters, {\f1{}tar} uses default parameters.  You cannot modify a compressed archive.  If you create an archive with the {\f1{}--blocking-factor={\i 512-size}} ({\f1{}-b {\i 512-size}}) option specified (see {\uldb Blocking Factor}{\v Blocking_Factor}), you must specify that blocking-factor when operating on the archive.  See {\uldb Formats}{\v Formats}, for other examples of format parameter considerations.\par
\par
\page\pard Node: {\b Blocking Factor}, \keepn Next: {\uldb }{\v }, Prev: {\uldb Format Variations}{\v Format_Variations}, Up: {\uldb Blocking}{\v Blocking}\line
K{\footnote K Blocking Factor}
#{\footnote Blocking_Factor}
${\footnote \pard{}The Blocking Factor of an Archive}\par
\pard{\fs24\b The Blocking Factor of an Archive}\par
\par
\pard{}{K{\footnote K Blocking Factor}}{K{\footnote K Record Size}}{K{\footnote K Number of blocks per record}}{K{\footnote K Number of bytes per record}}{K{\footnote K Bytes per record}}{K{\footnote K Blocks per record}}{{\par
{\i \pard\li720{}(This message will disappear, once this node revised.)}\par
\pard{}}}\par
\pard{}The data in an archive is grouped into blocks, which are 512 bytes.  Blocks are read and written in whole number multiples called \'A2records\'A2.  The number of blocks in a record (ie. the size of a record in units of 512 bytes) is called the \'A2blocking factor\'A2.  The {\f1{}--blocking-factor={\i 512-size}} ({\f1{}-b {\i 512-size}}) option specifies the blocking factor of an archive.  The default blocking factor is typically 20 (ie.  10240 bytes), but can be specified at installation.  To find out the blocking factor of an existing archive, use {\f1{}tar --list --file={\i archive-name}}.  This may not work on some devices.\par
\par
\pard{}Records are separated by gaps, which waste space on the archive media.  If you are archiving on magnetic tape, using a larger blocking factor (and therefore larger records) provides faster throughput and allows you to fit more data on a tape (because there are fewer gaps). If you are archiving on cartridge, a very large blocking factor (say 126 or more) greatly increases performance. A smaller blocking factor, on the other hand, may be usefull when archiving small files, to avoid archiving lots of nulls as {\f1{}tar} fills out the archive to the end of the record.  In general, the ideal record size depends on the size of the inter-record gaps on the tape you are using, and the average size of the files you are archiving.  See {\uldb create}{\v create}, for information on writing archives.\par
\par
\pard{}Archives with blocking factors larger than 20 cannot be read by very old versions of {\f1{}tar}, or by some newer versions of {\f1{}tar} running on old machines with small address spaces.  With GNU {\f1{}tar}, the blocking factor of an archive is limited only by the maximum record size of the device containing the archive, or by the amount of available virtual memory.\par
\par
\pard{}Also, on some systems, not using adequate blocking factors, as sometimes imposed by the device drivers, may yield unexpected diagnostics.  For example, this has been reported:\par
\par
{\pard\keep\li720\f1{}Cannot write to /dev/dlt: Invalid argument\par
\pard\f0{}}\par
\pard{}In such cases, it sometimes happen that the {\f1{}tar} bundled by the system is aware of block size idiosyncrasies, while GNU {\f1{}tar} requires an explicit specification for the block size, which it cannot guess.  This yields some people to consider GNU {\f1{}tar} is misbehaving, because by comparison, {\i the bundle {\f1{}tar} works OK}.  Adding {\f1{}-b 256}, for example, might resolve the problem.\par
\par
\pard{}If you use a non-default blocking factor when you create an archive, you must specify the same blocking factor when you modify that archive.  Some archive devices will also require you to specify the blocking factor when reading that archive, however this is not typically the case.  Usually, you can use {\f1{}--list} ({\f1{}-t}) without specifying a blocking factor--{\f1{}tar} reports a non-default record size and then lists the archive members as it would normally.  To extract files from an archive with a non-standard blocking factor (particularly if you're not sure what the blocking factor is), you can usually use the {\f1{}--read-full-records} ({\f1{}-B}) option while specifying a blocking factor larger then the blocking factor of the archive (ie. {\f1{}tar --extract --read-full-records --blocking-factor=300}.  See {\uldb list}{\v list}, for more information on the {\f1{}--list} ({\f1{}-t}) operation.  See {\uldb Reading}{\v Reading}, for a more detailed explanation of that option.\par
\par
{\pard{}{\f1{}--blocking-factor={\i number}}\par
\pard{}{\f1{}-b {\i number}}\par
\pard\li720{}Specifies the blocking factor of an archive.  Can be used with any operation, but is usually not necessary with {\f1{}--list} ({\f1{}-t}).\par
\pard{}}\par
\pard{}Device blocking\par
\par
{\pard{}{\f1{}-b {\i blocks}}\par
\pard{}{\f1{}--blocking-factor={\i blocks}}\par
\pard\li720{}Set record size to {\i blocks} * 512 bytes.\par
\par
\pard\li720{}This option is used to specify a \'A2blocking factor\'A2 for the archive.  When reading or writing the archive, {\f1{}tar}, will do reads and writes of the archive in records of {\i block}*512 bytes.  This is true even when the archive is compressed.  Some devices requires that all write operations be a multiple of a certain size, and so, {\f1{}tar} pads the archive out to the next record boundary.\par
\par
\pard\li720{}The default blocking factor is set when {\f1{}tar} is compiled, and is typically 20.  Blocking factors larger than 20 cannot be read by very old versions of {\f1{}tar}, or by some newer versions of {\f1{}tar} running on old machines with small address spaces.\par
\par
\pard\li720{}With a magnetic tape, larger records give faster throughput and fit more data on a tape (because there are fewer inter-record gaps).  If the archive is in a disk file or a pipe, you may want to specify a smaller blocking factor, since a large one will result in a large number of null bytes at the end of the archive.\par
\par
\pard\li720{}When writing cartridge or other streaming tapes, a much larger blocking factor (say 126 or more) will greatly increase performance.  However, you must specify the same blocking factor when reading or updating the archive.\par
\par
\pard\li720{}Apparently, Exabyte drives have a physical block size of 8K bytes.  If we choose our blocksize as a multiple of 8k bytes, then the problem seems to dissapper.  Id est, we are using block size of 112 right now, and we haven't had the problem since we switched...\par
\par
\pard\li720{}With GNU {\f1{}tar} the blocking factor is limited only by the maximum record size of the device containing the archive, or by the amount of available virtual memory.\par
\par
\pard\li720{}However, deblocking or reblocking is virtually avoided in a special case which often occurs in practice, but which requires all the following conditions to be simultaneously true: {\par
\pard\fi-720\li1440\tx864\tx1440{}\tab{}{\f2\'B7}\tab{}the archive is subject to a compression option,\par
\par
\pard\fi-720\li1440\tx864\tx1440{}\tab{}{\f2\'B7}\tab{}the archive is not handled through standard input or output, nor redirected nor piped,\par
\par
\pard\fi-720\li1440\tx864\tx1440{}\tab{}{\f2\'B7}\tab{}the archive is directly handled to a local disk, instead of any special device,\par
\par
\pard\fi-720\li1440\tx864\tx1440{}\tab{}{\f2\'B7}\tab{}o\'7BNo Value For "p-blocking-factor"\'7D is not explicitely specified on the {\f1{}tar} invocation.\par
\pard\li720{}}\par
\pard\li720{}In previous versions of GNU {\f1{}tar}, the {\f1{}--compress-block} option (or even older: {\f1{}--block-compress}) was necessary to reblock compressed archives.  It is now a dummy option just asking not to be used, and otherwise ignored.  If the output goes directly to a local disk, and not through stdout, then the last write is not extended to a full record size.  Otherwise, reblocking occurs.  Here are a few other remarks on this topic:\par
\par
{\pard\fi-720\li1440\tx864\tx1440{}\tab{}{\f2\'B7}\tab{}{\f1{}gzip} will complain about trailing garbage if asked to uncompress a compressed archive on tape, there is an option to turn the message off, but it breaks the regularity of simply having to use {\f1{}{\i prog} -d} for decompression.  It would be nice if gzip was silently ignoring any number of trailing zeros.  I'll ask Jean-loup Gailly, by sending a copy of this message to him.\par
\par
\pard\fi-720\li1440\tx864\tx1440{}\tab{}{\f2\'B7}\tab{}{\f1{}compress} does not show this problem, but as Jean-loup pointed out to Michael, {\f1{}compress -d} silently adds garbage after the result of decompression, which tar ignores because it already recognized its end-of-file indicator.  So this bug may be safely ignored.\par
\par
\pard\fi-720\li1440\tx864\tx1440{}\tab{}{\f2\'B7}\tab{}{\f1{}gzip -d -q} will be silent about the trailing zeros indeed, but will still return an exit status of 2 which tar reports in turn.  {\f1{}tar} might ignore the exit status returned, but I hate doing that, as it weakens the protection {\f1{}tar} offers users against other possible problems at decompression time.  If {\f1{}gzip} was silently skipping trailing zeros {\i and} also avoiding setting the exit status in this innocuous case, that would solve this situation.\par
\par
\pard\fi-720\li1440\tx864\tx1440{}\tab{}{\f2\'B7}\tab{}{\f1{}tar} should become more solid at not stopping to read a pipe at the first null block encountered.  This inelegantly breaks the pipe.  {\f1{}tar} should rather drain the pipe out before exiting itself.\par
\pard\li720{}}\par
\pard{}{\f1{}-i}\par
\pard{}{\f1{}--ignore-zeros}\par
\pard\li720{}Ignore blocks of zeros in archive (means EOF).\par
\par
\pard\li720{}The {\f1{}--ignore-zeros} ({\f1{}-i}) option causes {\f1{}tar} to ignore blocks of zeros in the archive.  Normally a block of zeros indicates the end of the archive, but when reading a damaged archive, or one which was created by {\f1{}cat}-ing several archives together, this option allows {\f1{}tar} to read the entire archive.  This option is not on by default because many versions of {\f1{}tar} write garbage after the zeroed blocks.\par
\par
\pard\li720{}Note that this option causes {\f1{}tar} to read to the end of the archive file, which may sometimes avoid problems when multiple files are stored on a single physical tape.\par
\par
\pard{}{\f1{}-B}\par
\pard{}{\f1{}--read-full-records}\par
\pard\li720{}Reblock as we read (for reading 4.2BSD pipes).\par
\par
\pard\li720{}If {\f1{}--read-full-records} ({\f1{}-B}) is used, {\f1{}tar} will not panic if an attempt to read a record from the archive does not return a full record.  Instead, {\f1{}tar} will keep reading until it has obtained a full record.\par
\par
\pard\li720{}This option is turned on by default when {\f1{}tar} is reading an archive from standard input, or from a remote machine.  This is because on BSD Unix systems, a read of a pipe will return however much happens to be in the pipe, even if it is less than {\f1{}tar} requested.  If this option was not used, {\f1{}tar} would fail as soon as it read an incomplete record from the pipe.\par
\par
\pard\li720{}This option is also useful with the commands for updating an archive.\par
\par
\pard{}}\par
\pard{}Tape blocking\par
\par
\pard{}{K{\footnote K blocking factor}}{K{\footnote K tape blocking}} When handling various tapes or cartridges, you have to take care of selecting a proper blocking, that is, the number of disk blocks you put together as a single tape block on the tape, without intervening tape gaps.  A \'A2tape gap\'A2 is a small landing area on the tape with no information on it, used for decelerating the tape to a full stop, and for later regaining the reading or writing speed.  When the tape driver starts reading a record, the record has to be read whole without stopping, as a tape gap is needed to stop the tape motion without loosing information.\par
\par
\pard{}{K{\footnote K Exabyte blocking}}{K{\footnote K DAT blocking}}Using higher blocking (putting more disk blocks per tape block) will use the tape more efficiently as there will be less tape gaps.  But reading such tapes may be more difficult for the system, as more memory will be required to receive at once the whole record.  Further, if there is a reading error on a huge record, this is less likely that the system will succeed in recovering the information.  So, blocking should not be too low, nor it should be too high.  {\f1{}tar} uses by default a blocking of 20 for historical reasons, and it does not really matter when reading or writing to disk.  Current tape technology would easily accomodate higher blockings.  Sun recommends a blocking of 126 for Exabytes and 96 for DATs.  We were told that for some DLT drives, the blocking should be a multiple of 4Kb, preferably 64Kb ({\f1{}-b 128}) or 256 for decent performance.  Other manufacturers may use different recommendations for the same tapes.  This might also depends of the buffering techniques used inside modern tape controllers.  Some imposes a minimum blocking, or a maximum blocking.  Others request blocking to be some exponent of two.\par
\par
\pard{}So, there is no fixed rule for blocking.  But blocking at read time should ideally be the same as blocking used at write time.  At one place I know, with a wide variety of equipment, they found it best to use a blocking of 32 to guarantee that their tapes are fully interchangeable.\par
\par
\pard{}I was also told that, for recycled tapes, prior erasure (by the same drive unit that will be used to create the archives) sometimes lowers the error rates observed at rewriting time.\par
\par
\pard{}I might also use {\f1{}--number-blocks} instead of {\f1{}--block-number}, so {\f1{}--block} will then expand to {\f1{}--blocking-factor} unambiguously.\par
\par
\page\pard Node: {\b Many}, \keepn Next: {\uldb Using Multiple Tapes}{\v Using_Multiple_Tapes}, Prev: {\uldb Blocking}{\v Blocking}, Up: {\uldb Media}{\v Media}\line
K{\footnote K Many}
#{\footnote Many}
${\footnote \pard{}Many Archives on One Tape}\par
\pard{\fs24\b Many Archives on One Tape}\par
\par
\pard{}{K{\footnote K ntape device}}Most tape devices have two entries in the {\f1{}/dev} directory, or entries that come in pairs, which differ only in the minor number for this device.  Let's take for example {\f1{}/dev/tape}, which often points to the only or usual tape device of a given system.  There might be a corresponding {\f1{}/dev/nrtape} or {\f1{}/dev/ntape}.  The simpler name is the {\i rewinding} version of the device, while the name having {\f1{}nr} in it is the {\i no rewinding} version of the same device.\par
\par
\pard{}A rewinding tape device will bring back the tape to its beginning point automatically when this device is opened or closed.  Since {\f1{}tar} opens the archive file before using it and closes it afterwards, this means that a simple:\par
\par
{\pard\keep\li720\f1{}$ tar cf /dev/tape {\i directory}\par
\pard\f0{}}\par
\pard{}will reposition the tape to its beginning both prior and after saving {\i directory} contents to it, thus erasing prior tape contents and making it so that any subsequent write operation will destroy what has just been saved.\par
\par
\pard{}{K{\footnote K tape positioning}}So, a rewinding device is normally meant to hold one and only one file.  If you want to put more than one {\f1{}tar} archive on a given tape, you will need to avoid using the rewinding version of the tape device.  You will also have to pay special attention to tape positioning.  Errors in positionning may overwrite the valuable data already on your tape.  Many people, burnt by past experiences, will only use rewinding devices and limit themselves to one file per tape, precisely to avoid the risk of such errors.  Be fully aware that writing at the wrong position on a tape loses all information past this point and most probably until the end of the tape, and this destroyed information {\i cannot} be recovered.\par
\par
\pard{}To save {\i directory-1} as a first archive at the beginning of a tape, and leave that tape ready for a second archive, you should use:\par
\par
{\pard\keep\li720\f1{}$ mt -f /dev/nrtape rewind\line
$ tar cf /dev/nrtape {\i directory-1}\par
\pard\f0{}}\par
\pard{}{K{\footnote K tape marks}}\'A2Tape marks\'A2 are special magnetic patterns written on the tape media, which are later recognizable by the reading hardware.  These marks are used after each file, when there are many on a single tape.  An empty file (that is to say, two tape marks in a row) signal the logical end of the tape, after which no file exist.  Usually, non-rewinding tape device drivers will react to the close request issued by {\f1{}tar} by first writing two tape marks after your archive, and by backspacing over one of these.  So, if you remove the tape at that time from the tape drive, it is properly terminated.  But if you write another file at the current position, the second tape mark will be erased by the new information, leaving only one tape mark between files.\par
\par
\pard{}So, you may now save {\i directory-2} as a second archive after the first on the same tape by issuing the command:\par
\par
{\pard\keep\li720\f1{}$ tar cf /dev/nrtape {\i directory-2}\par
\pard\f0{}}\par
\pard{}and so on for all the archives you want to put on the same tape.\par
\par
\pard{}Another usual case is that you do not write all the archives the same day, and you need to remove and store the tape between two archive sessions.  In general, you must remember how many files are already saved on your tape.  Suppose your tape already has 16 files on it, and that you are ready to write the 17th.  You have to take care of skipping the first 16 tape marks before saving {\i directory-17}, say, by using these commands:\par
\par
{\pard\keep\li720\f1{}$ mt -f /dev/nrtape rewind\line
$ mt -f /dev/nrtape fsf 16\line
$ tar cf /dev/nrtape {\i directory-17}\par
\pard\f0{}}\par
\pard{}In all the previous examples, we put aside blocking considerations, but you should do the proper things for that as well.  See {\uldb Blocking}{\v Blocking}.\par
\par
{\par
\pard\keep\fi-2880\li2880\tx2880{}{\uldb Tape Positioning}{\v Tape_Positioning}\tab Tape Positions and Tape Marks\par
{\uldb mt}{\v mt}\tab The {\f1{}mt} Utility\par
\pard{}}\par
\page\pard Node: {\b Tape Positioning}, \keepn Next: {\uldb mt}{\v mt}, Prev: {\uldb Many}{\v Many}, Up: {\uldb Many}{\v Many}\line
K{\footnote K Tape Positioning}
#{\footnote Tape_Positioning}
${\footnote \pard{}Tape Positions and Tape Marks}\par
\pard{\fs24\b Tape Positions and Tape Marks}\par
\par
{{{\i \pard\li720{}(This message will disappear, once this node revised.)}\par
\pard{}}}\par
\pard{}Just as archives can store more than one file from the file system, tapes can store more than one archive file.  To keep track of where archive files (or any other type of file stored on tape) begin and end, tape archive devices write magnetic \'A2tape marks\'A2 on the archive media.  Tape drives write one tape mark between files, two at the end of all the file entries.\par
\par
\pard{}If you think of data as a series of records "rrrr"'s, and tape marks as "*"'s, a tape might look like the following:\par
\par
{\pard\keep\li720\f1{}rrrr*rrrrrr*rrrrr*rr*rrrrr**-------------------------\par
\pard\f0{}}\par
\pard{}Tape devices read and write tapes using a read/write \'A2tape head\'A2--a physical part of the device which can only access one point on the tape at a time.  When you use {\f1{}tar} to read or write archive data from a tape device, the device will begin reading or writing from wherever on the tape the tape head happens to be, regardless of which archive or what part of the archive the tape head is on.  Before writing an archive, you should make sure that no data on the tape will be overwritten (unless it is no longer needed).  Before reading an archive, you should make sure the tape head is at the beginning of the archive you want to read.  (The {\f1{}restore} script will find the archive automatically.  .  ).  See {\uldb mt}{\v mt}, for an explanation of the tape moving utility.\par
\par
\pard{}If you want to add new archive file entries to a tape, you should advance the tape to the end of the existing file entries, backspace over the last tape mark, and write the new archive file.  If you were to add two archives to the example above, the tape might look like the following:\par
\par
{\pard\keep\li720\f1{}rrrr*rrrrrr*rrrrr*rr*rrrrr*rrr*rrrr**----------------\par
\pard\f0{}}\par
\page\pard Node: {\b mt}, \keepn Next: {\uldb }{\v }, Prev: {\uldb Tape Positioning}{\v Tape_Positioning}, Up: {\uldb Many}{\v Many}\line
K{\footnote K mt}
#{\footnote mt}
${\footnote \pard{}The {\f1{}mt} Utility}\par
\pard{\fs24\b The {\f1{}mt} Utility}\par
\par
{{{\i \pard\li720{}(This message will disappear, once this node revised.)}\par
\pard{}}}\par
\pa\'7BNo Value For "rd\'7B\'7Dxref-blocking-factor"\'7D.\par
\par
\pard{}You can use the {\f1{}mt} utility to advance or rewind a tape past a specified number of archive files on the tape.  This will allow you to move to the beginning of an archive before extracting or reading it, or to the end of all the archives before writing a new one.\par
\par
\pard{}The syntax of the {\f1{}mt} command is:\par
\par
{\pard\keep\li720\f1{}mt [-f {\i tapename}] {\i operation} [{\i number}]\par
\pard\f0{}}\par
\pard{}where {\i tapename} is the name of the tape device, {\i number} is the number of times an operation is performed (with a default of one), and {\i operation} is one of the following:\par
\par
{\pard{}{\f1{}eof}\par
\pard{}{\f1{}weof}\par
\pard\li720{}Writes {\i number} tape marks at the current position on the tape.\par
\par
\pard{}{\f1{}fsf}\par
\pard\li720{}Moves tape position forward {\i number} files.\par
\par
\pard{}{\f1{}bsf}\par
\pard\li720{}Moves tape position back {\i number} files.\par
\par
\pard{}{\f1{}rewind}\par
\pard\li720{}Rewinds the tape. (Ignores {\i number}).\par
\par
\pard{}{\f1{}offline}\par
\pard{}{\f1{}rewoff1}\par
\pard\li720{}Rewinds the tape and takes the tape device off-line. (Ignores {\i number}).\par
\par
\pard{}{\f1{}status}\par
\pard\li720{}Prints status information about the tape unit.\par
\par
\pard{}}\par
\pard{}If you don't specify a {\i tapename}, {\f1{}mt} uses the environment variable TAPE; if TAPE does not exist, {\f1{}mt} uses the device {\f1{}/dev/rmt12}.\par
\par
{\f1{}\pard{}mt} returns a 0 exit status when the operation(s) were successful, 1 if the command was unrecognized, and 2 if an operation failed.\par
\par
\pard{}If you use {\f1{}--extract} ({\f1{}--get}, {\f1{}-x}) with the {\f1{}--label={\i archive-label}} ({\f1{}-V {\i archive-label}}) option specified, {\f1{}tar} will read an archive label (the tape head has to be positioned on it) and print an error if the archive label doesn't match the {\i archive-name} specified.  {\i archive-name} can be any regular expression.  If the labels match, {\f1{}tar} extracts the archive.  See {\uldb label}{\v label}.  .   {\f1{}tar --list --label} will cause {\f1{}tar} to print the label.\par
\par
\page\pard Node: {\b Using Multiple Tapes}, \keepn Next: {\uldb label}{\v label}, Prev: {\uldb Many}{\v Many}, Up: {\uldb Media}{\v Media}\line
K{\footnote K Using Multiple Tapes}
#{\footnote Using_Multiple_Tapes}
${\footnote \pard{}Using Multiple Tapes}\par
\pard{\fs24\b Using Multiple Tapes}\par
\par
{{{\i \pard\li720{}(This message will disappear, once this node revised.)}\par
\pard{}}}\par
\pard{}Often you might want to write a large archive, one larger than will fit on the actual tape you are using.  In such a case, you can run multiple {\f1{}tar} commands, but this can be inconvenient, particularly if you are using options like {\f1{}--exclude={\i pattern}} or dumping entire filesystems.  Therefore, {\f1{}tar} supports multiple tapes automatically.\par
\par
\pard{}Use {\f1{}--multi-volume} ({\f1{}-M}) on the command line, and then {\f1{}tar} will, when it reaches the end of the tape, prompt for another tape, and continue the archive.  Each tape will have an independent archive, and can be read without needing the other.  (As an exception to this, the file that {\f1{}tar} was archiving when it ran out of tape will usually be split between the two archives; in this case you need to extract from the first archive, using {\f1{}--multi-volume} ({\f1{}-M}), and then put in the second tape when prompted, so {\f1{}tar} can restore both halves of the file.)\par
\par
\pard{}GNU {\f1{}tar} multi-volume archives do not use a truly portable format.  You need GNU {\f1{}tar} at both end to process them properly.\par
\par
\pard{}When prompting for a new tape, {\f1{}tar} accepts any of the following responses:\par
\par
{\pard{}{\f1{}?}\par
\pard\li720{}Request {\f1{}tar} to explain possible responses\par
\par
\pard{}{\f1{}q}\par
\pard\li720{}Request {\f1{}tar} to exit immediately.\par
\par
\pard{}{\f1{}n {\i file name}}\par
\pard\li720{}Request {\f1{}tar} to write the next volume on the file {\i file name}.\par
\par
\pard{}{\f1{}!}\par
\pard\li720{}Request {\f1{}tar} to run a subshell.\par
\par
\pard{}{\f1{}y}\par
\pard\li720{}Request {\f1{}tar} to begin writing the next volume.\par
\pard{}}\par
\pard{}(You should only type {\f1{}y} after you have changed the tape; otherwise {\f1{}tar} will write over the volume it just finished.)\par
\par
\pard{}If you want more elaborate behavior than this, give {\f1{}tar} the {\f1{}--info-script={\i script-name}} ({\f1{}--new-volume-script={\i script-name}}, {\f1{}-F {\i script-name}}) option.  The file {\i script-name} is expected to be a program (or shell script) to be run instead of the normal prompting procedure.  When the program finishes, {\f1{}tar} will immediately begin writing the next volume.  The behavior of the {\f1{}n} response to the normal tape-change prompt is not available if you use {\f1{}--info-script={\i script-name}} ({\f1{}--new-volume-script={\i script-name}}, {\f1{}-F {\i script-name}}).\par
\par
\pard{}The method {\f1{}tar} uses to detect end of tape is not perfect, and fails on some operating systems or on some devices.  You can use the {\f1{}--tape-length={\i 1024-size}} ({\f1{}-L {\i 1024-size}}) option if {\f1{}tar} can't detect the end of the tape itself.  This option selects {\f1{}--multi-volume} ({\f1{}-M}) automatically.  The {\i size} argument should then be the usable size of the tape.  But for many devices, and floppy disks in particular, this option is never required for real, as far as we know.\par
\par
\pard{}The volume number used by {\f1{}tar} in its tape-change prompt can be changed; if you give the {\f1{}--volno-file={\i file-of-number}} option, then {\i file-of-number} should be an unexisting file to be created, or else, a file already containing a decimal number.  That number will be used as the volume number of the first volume written.  When {\f1{}tar} is finished, it will rewrite the file with the now-current volume number.  (This does not change the volume number written on a tape label, as per {\uldb label}{\v label}, it {\i only} affects the number used in the prompt.)\par
\par
\pard{}If you want {\f1{}tar} to cycle through a series of tape drives, then you can use the {\f1{}n} response to the tape-change prompt.  This is error prone, however, and doesn't work at all with {\f1{}--info-script={\i script-name}} ({\f1{}--new-volume-script={\i script-name}}, {\f1{}-F {\i script-name}}).  Therefore, if you give {\f1{}tar} multiple {\f1{}--file={\i archive-name}} ({\f1{}-f {\i archive-name}}) options, then the specified files will be used, in sequence, as the successive volumes of the archive.  Only when the first one in the sequence needs to be used again will {\f1{}tar} prompt for a tape change (or run the info script).\par
\par
\pard{}Multi-volume archives\par
\par
\pard{}With {\f1{}--multi-volume} ({\f1{}-M}), {\f1{}tar} will not abort when it cannot read or write any more data.  Instead, it will ask you to prepare a new volume.  If the archive is on a magnetic tape, you should change tapes now; if the archive is on a floppy disk, you should change disks, etc.\par
\par
\pard{}Each volume of a multi-volume archive is an independent {\f1{}tar} archive, complete in itself.  For example, you can list or extract any volume alone; just don't specify {\f1{}--multi-volume} ({\f1{}-M}).  However, if one file in the archive is split across volumes, the only way to extract it successfully is with a multi-volume extract command {\f1{}--extract --multi-volume} ({\f1{}-xM}) starting on or before the volume where the file begins.\par
\par
\pard{}For example, let's presume someone has two tape drives on a system named {\f1{}/dev/tape0} and {\f1{}/dev/tape1}.  For having GNU {\f1{}tar} to switch to the second drive when it needs to write the second tape, and then back to the first tape, etc., just do either of:\par
\par
{\pard\keep\li720\f1{}$ tar --create --multi-volume --file=/dev/tape0 --file=/dev/tape1 {\i files}\line
$ tar cMff /dev/tape0 /dev/tape1 {\i files}\par
\pard\f0{}}\par
{\par
\pard\keep\fi-2880\li2880\tx2880{}{\uldb Multi-Volume Archives}{\v Multi_Volume_Archives}\tab Archives Longer than One Tape or Disk\par
{\uldb Tape Files}{\v Tape_Files}\tab Tape Files\par
\pard{}}\par
\page\pard Node: {\b Multi-Volume Archives}, \keepn Next: {\uldb Tape Files}{\v Tape_Files}, Prev: {\uldb Using Multiple Tapes}{\v Using_Multiple_Tapes}, Up: {\uldb Using Multiple Tapes}{\v Using_Multiple_Tapes}\line
K{\footnote K Multi-Volume Archives}
#{\footnote Multi_Volume_Archives}
${\footnote \pard{}Archives Longer than One Tape or Disk}\par
\pard{\fs24\b Archives Longer than One Tape or Disk}\par
\par
\pard{}{K{\footnote K Multi-volume archives}}{{\par
{\i \pard\li720{}(This message will disappear, once this node revised.)}\par
\pard{}}}\par
\pard{}To create an archive that is larger than will fit on a single unit of the media, use the {\f1{}--multi-volume} ({\f1{}-M}) option in conjunction with the {\f1{}--create} ({\f1{}-c}) option (see {\uldb create}{\v create}).  A \'A2multi-volume\'A2 archive can be manipulated like any other archive (provided the {\f1{}--multi-volume} ({\f1{}-M}) option is specified), but is stored on more than one tape or disk.\par
\par
\pard{}When you specify {\f1{}--multi-volume} ({\f1{}-M}), {\f1{}tar} does not report an error when it comes to the end of an archive volume (when reading), or the end of the media (when writing).  Instead, it prompts you to load a new storage volume.  If the archive is on a magnetic tape, you should change tapes when you see the prompt; if the archive is on a floppy disk, you should change disks; etc.\par
\par
\pard{}You can read each individual volume of a multi-volume archive as if it were an archive by itself.  For example, to list the contents of one volume, use {\f1{}--list} ({\f1{}-t}), without {\f1{}--multi-volume} ({\f1{}-M}) specified.  To extract an archive member from one volume (assuming it is described that volume), use {\f1{}--extract} ({\f1{}--get}, {\f1{}-x}), again without {\f1{}--multi-volume} ({\f1{}-M}).\par
\par
\pard{}If an archive member is split across volumes (ie. its entry begins on one volume of the media and ends on another), you need to specify {\f1{}--multi-volume} ({\f1{}-M}) to extract it successfully.  In this case, you should load the volume where the archive member starts, and use {\f1{}tar --extract --multi-volume}--{\f1{}tar} will prompt for later volumes as it needs them.  See {\uldb extracting archives}{\v extracting_archives}, for more information about extracting archives.\par
\par
\pa\'7BNo Value For "rd\'7B\'7Dop-info-script"\'7D is like {\f1{}--multi-volume} ({\f1{}-M}), except that {\f1{}tar} does not prompt you directly to change media volumes when a volume is full--instead, {\f1{}tar} runs commands you have stored in {\i script-name}.  For example, this option can be used to eject cassettes, or to broadcast messages such as {\f1{}Someone please come change my tape} when performing unattended backups.  When {\i script-name} is done, {\f1{}tar} will assume that the media has been changed.\par
\par
\pard{}Multi-volume archives can be modified like any other archive.  To add files to a multi-volume archive, you need to only mount the last volume of the archive media (and new volumes, if needed).  For all other operations, you need to use the entire archive.\par
\par
\pard{}If a multi-volume archive was labeled using {\f1{}--label={\i archive-label}} ({\f1{}-V {\i archive-label}}) (see {\uldb label}{\v label}) when it was created, {\f1{}tar} will not automatically label volumes which are added later.  To label subsequent volumes, specify {\f1{}--label={\i archive-label}} ({\f1{}-V {\i archive-label}}) again in conjunction with the {\f1{}--append} ({\f1{}-r}), {\f1{}--update} ({\f1{}-u}) or {\f1{}--concatenate} ({\f1{}--catenate}, {\f1{}-A}) operation.\par
\par
\pard{}{K{\footnote K Labelling multi-volume archives}}\par
\par
{\pard{}{\f1{}--multi-volume}\par
\pard{}{\f1{}-M}\par
\pard\li720{}Creates a multi-volume archive, when used in conjunction with {\f1{}--create} ({\f1{}-c}).  To perform any other operation on a multi-volume archive, specify {\f1{}--multi-volume} ({\f1{}-M}) in conjunction with that operation.\par
\par
\pard{}{\f1{}--info-script={\i program-file}}\par
\pard{}{\f1{}-F {\i program-file}}\par
\pard\li720{}Creates a multi-volume archive via a script.  Used in conjunction with {\f1{}--create} ({\f1{}-c}).\par
\pard{}}\par
\pard{}Beware that there is {\i no} real standard about the proper way, for a {\f1{}tar} archive, to span volume boundaries.  If you have a multi-volume created by some vendor's {\f1{}tar}, there is almost no chance you could read all the volumes with GNU {\f1{}tar}.  The converse is also true: you may not expect multi-volume archives created by GNU {\f1{}tar} to be fully recovered by vendor's {\f1{}tar}.  Since there is little chance that, in mixed system configurations, some vendor's {\f1{}tar} will work on another vendor's machine, and there is a great chance that GNU {\f1{}tar} will work on most of them, your best bet is to install GNU {\f1{}tar} on all machines between which you know exchange of files is possible.\par
\par
\page\pard Node: {\b Tape Files}, \keepn Next: {\uldb }{\v }, Prev: {\uldb Multi-Volume Archives}{\v Multi_Volume_Archives}, Up: {\uldb Using Multiple Tapes}{\v Using_Multiple_Tapes}\line
K{\footnote K Tape Files}
#{\footnote Tape_Files}
${\footnote \pard{}Tape Files}\par
\pard{\fs24\b Tape Files}\par
\par
{{{\i \pard\li720{}(This message will disappear, once this node revised.)}\par
\pard{}}}\par
\pard{}To give the archive a name which will be recorded in it, use the {\f1{}--label={\i archive-label}} ({\f1{}-V {\i archive-label}}) option.  This will write a special block identifying {\i volume-label} as the name of the archive to the front of the archive which will be displayed when the archive is listed with {\f1{}--list} ({\f1{}-t}).  If you are creating a multi-volume archive with {\f1{}--multi-volume} ({\f1{}-M}) (), then the volume label will have {\f1{}Volume {\i nnn}} appended to the name you give, where {\i nnn} is the number of the volume of the archive.  (If you use the {\f1{}--label={\i archive-label}} ({\f1{}-V {\i archive-label}}) option when reading an archive, it checks to make sure the label on the tape matches the one you give.  See {\uldb label}{\v label}.\par
\par
\pard{}When {\f1{}tar} writes an archive to tape, it creates a single tape file.  If multiple archives are written to the same tape, one after the other, they each get written as separate tape files.  When extracting, it is necessary to position the tape at the right place before running {\f1{}tar}.  To do this, use the {\f1{}mt} command.  For more information on the {\f1{}mt} command and on the organization of tapes into a sequence of tape files, see {\uldb mt}{\v mt}.\par
\par
\pard{}People seem to often do:\par
\par
{\pard\keep\li720\f1{}--label="{\i some-prefix} `date +{\i some-format}`"\par
\pard\f0{}}\par
\pard{}or such, for pushing a common date in all volumes or an archive set.\par
\par
\page\pard Node: {\b label}, \keepn Next: {\uldb verify}{\v verify}, Prev: {\uldb Using Multiple Tapes}{\v Using_Multiple_Tapes}, Up: {\uldb Media}{\v Media}\line
K{\footnote K label}
#{\footnote label}
${\footnote \pard{}Including a Label in the Archive}\par
\pard{\fs24\b Including a Label in the Archive}\par
\par
\pard{}{K{\footnote K Labeling an archive}}{K{\footnote K Labels on the archive media}}{{\par
{\i \pard\li720{}(This message will disappear, once this node revised.)}\par
\pard{}}}\par
{\pard{}{\f1{}-V {\i name}}\par
\pard{}{\f1{}--label={\i name}}\par
\pard\li720{}Create archive with volume name {\i name}.\par
\pard{}}\par
\pard{}This option causes {\f1{}tar} to write out a \'A2volume header\'A2 at the beginning of the archive.  If {\f1{}--multi-volume} ({\f1{}-M}) is used, each volume of the archive will have a volume header of {\f1{}{\i name} Volume {\i n}}, where {\i n} is 1 for the first volume, 2 for the next, and so on.\par
\par
\pard{}To avoid problems caused by misplaced paper labels on the archive media, you can include a \'A2label\'A2 entry--an archive member which contains the name of the archive--in the archive itself.  Use the {\f1{}--label={\i archive-label}} ({\f1{}-V {\i archive-label}}) option in conjunction with the {\f1{}--create} ({\f1{}-c}) operation to include a label entry in the archive as it is being created.\par
\par
\pard{}If you create an archive using both {\f1{}--label={\i archive-label}} ({\f1{}-V {\i archive-label}}) and {\f1{}--multi-volume} ({\f1{}-M}), each volume of the archive will have an archive label of the form {\f1{}{\i archive-label} Volume {\i n}}, where {\i n} is 1 for the first volume, 2 for the next, and so on.  , for information on creating multiple volume archives.\par
\par
\pard{}If you list or extract an archive using {\f1{}--label={\i archive-label}} ({\f1{}-V {\i archive-label}}), {\f1{}tar} will print an error if the archive label doesn't match the {\i archive-label} specified, and will then not list nor extract the archive.  In those cases, {\i archive-label} argument is interpreted as a globbing-style pattern which must match the actual magnetic volume label.  See {\uldb exclude}{\v exclude}, for a precise description of how match is attempted({\ul 1}{\v label_1}).  If the switch {\f1{}--multi-volume} ({\f1{}-M}) is being used, the volume label matcher will also suffix {\i archive-label} by {\f1{} Volume [1-9]*} if the initial match fails, before giving up.  Since the volume numbering is automatically added in labels at creation time, it sounded logical to equally help the user taking care of it when the archive is being read.\par
\par
\pard{}The {\f1{}--label={\i archive-label}} ({\f1{}-V {\i archive-label}}) was once called {\f1{}--volume}, but is not available under that name anymore.\par
\par
\pard{}To find out an archive's label entry (or to find out if an archive has a label at all), use {\f1{}tar --list --verbose}.  {\f1{}tar} will print the label first, and then print archive member information, as in the example below:\par
\par
{\pard\keep\li720\f1{}$ tar --verbose --list --file=iamanarchive\line
V--------- 0 0        0 1992-03-07 12:01 iamalabel--Volume Header--\line
-rw-rw-rw- ringo user 40 1990-05-21 13:30 iamafilename\par
\pard\f0{}}\par
{\pard{}{\f1{}--label={\i archive-label}}\par
\pard{}{\f1{}-V {\i archive-label}}\par
\pard\li720{}Includes an \'A2archive-label\'A2 at the beginning of the archive when the archive is being created, when used in conjunction with the {\f1{}--create} ({\f1{}-c}) option.  Checks to make sure the archive label matches the one specified (when used in conjunction with the {\f1{}--extract} ({\f1{}--get}, {\f1{}-x}) option.\par
\pard{}}\par
\pard{}To get a common information on all tapes of a series, use the {\f1{}--label={\i archive-label}} ({\f1{}-V {\i archive-label}}) option.  For having this information different in each series created through a single script used on a regular basis, just manage to get some date string as part of the label.  For example:\par
\par
{\pard\keep\li720\f1{}$ tar cfMV /dev/tape "Daily backup for `date +%Y-%m-%d`"\line
$ tar --create --file=/dev/tape --multi-volume \'5C\line
     --volume="Daily backup for `date +%Y-%m-%d`"\par
\pard\f0{}}\par
\pard{}Also note that each label has its own date and time, which corresponds to when GNU {\f1{}tar} initially attempted to write it, often soon after the operator launches {\f1{}tar} or types the carriage return telling that the next tape is ready.  Comparing date labels does give an idea of tape throughput only if the delays for rewinding tapes and the operator switching them were negligible, which is ususally not the case.\par
\par
\page\pard#{\footnote label_1}
\pard{}(1) Previous versions of {\f1{}tar} used full regular expression matching, or before that, only exact string matching, instead of wildcard matchers.  We decided for the sake of simplicity to use a uniform matching device through {\f1{}tar}.\par
\par
\page\pard Node: {\b verify}, \keepn Next: {\uldb Write Protection}{\v Write_Protection}, Prev: {\uldb label}{\v label}, Up: {\uldb Media}{\v Media}\line
K{\footnote K verify}
#{\footnote verify}
${\footnote \pard{}Verifying Data as It is Stored}\par
\pard{\fs24\b Verifying Data as It is Stored}\par
\par
\pard{}{K{\footnote K Verifying a write operation}}{K{\footnote K Double-checking a write operation}} {\par
\pard{}{\f1{}-W}\par
\pard{}{\f1{}--verify}\par
\pard\li720{}Attempt to verify the archive after writing.\par
\pard{}}\par
\pard{}This option causes {\f1{}tar} to verify the archive after writing it.  Each volume is checked after it is written, and any discrepancies are recorded on the standard error output.\par
\par
\pard{}Verification requires that the archive be on a back-space-able medium.  This means pipes, some cartridge tape drives, and some other devices cannot be verified.\par
\par
\pard{}You can insure the accuracy of an archive by comparing files in the system with archive members.  {\f1{}tar} can compare an archive to the file system as the archive is being written, to verify a write operation, or can compare a previously written archive, to insure that it is up to date.\par
\par
\pard{}To check for discrepancies in an archive immediately after it is written, use the {\f1{}--verify} ({\f1{}-W}) option in conjunction with the {\f1{}--create} ({\f1{}-c}) operation.  When this option is specified, {\f1{}tar} checks archive members against their counterparts in the file system, and reports discrepancies on the standard error.  In multi-volume archives, each volume is verified after it is written, before the next volume is written.\par
\par
\pard{}To verify an archive, you must be able to read it from before the end of the last written entry.  This option is useful for detecting data errors on some tapes.  Archives written to pipes, some cartridge tape drives, and some other devices cannot be verified.\par
\par
\pard{}One can explicitely compare an already made archive with the file system by using the {\f1{}--compare} ({\f1{}--diff}, {\f1{}-d}) option, instead of using the more automatic {\f1{}--verify} ({\f1{}-W}) option.  See {\uldb compare}{\v compare}.\par
\par
\pard{}Note that these two options have a slightly different intent.  The {\f1{}--compare} ({\f1{}--diff}, {\f1{}-d}) option how identical are the logical contents of some archive with what is on your disks, while the {\f1{}--verify} ({\f1{}-W}) option is really for checking if the physical contents agree and if the recording media itself is of dependable quality.  So, for the {\f1{}--verify} ({\f1{}-W}) operation, {\f1{}tar} tries to defeat all in-memory cache pertaining to the archive, while it lets the speed optimization undisturbed for the {\f1{}--compare} ({\f1{}--diff}, {\f1{}-d}) option.  If you nevertheless use {\f1{}--compare} ({\f1{}--diff}, {\f1{}-d}) for media verification, you may have to defeat the in-memory cache yourself, maybe by opening and reclosing the door latch of your recording unit, forcing some doubt in your operating system about the fact this is really the same volume as the one just written or read.\par
\par
\pard{}The {\f1{}--verify} ({\f1{}-W}) option would not be necessary if drivers were indeed able to detect dependably all write failures.  This sometimes require many magnetic heads, some able to read after the writes occurred.  One would not say that drivers unable to detect all cases are necessarily flawed, as long as programming is concerned.\par
\par
\page\pard Node: {\b Write Protection}, \keepn Next: {\uldb }{\v }, Prev: {\uldb verify}{\v verify}, Up: {\uldb Media}{\v Media}\line
K{\footnote K Write Protection}
#{\footnote Write_Protection}
${\footnote \pard{}Write Protection}\par
\pard{\fs24\b Write Protection}\par
\par
\pard{}Almost all tapes and diskettes, and in a few rare cases, even disks can be \'A2write protected\'A2, to protect data on them from being changed.  Once an archive is written, you should write protect the media to prevent the archive from being accidently overwritten or deleted.  (This will protect the archive from being changed with a tape or floppy drive--it will not protect it from magnet fields or other physical hazards).\par
\par
\pard{}The write protection device itself is usually an integral part of the physical media, and can be a two position (write enabled/write disabled) switch, a notch which can be popped out or covered, a ring which can be removed from the center of a tape reel, or some other changeable feature.\par
\par
\page\pard Node: {\b Index}, \keepn Next: {\uldb }{\v }, Prev: {\uldb Media}{\v Media}, Up: {\uldb Top}{\v Top}\line
K{\footnote K Index}
#{\footnote Index}
${\footnote \pard{}Index}\par
\pard{\fs24\b Index}\par
\par
{\fi-2880\li2880\tx2880-backup:\tab {\uldb backup}{\v backup}.\par}{\fi-2880\li2880\tx2880-suffix:\tab {\uldb backup}{\v backup}.\par}{\fi-2880\li2880\tx2880-version-control:\tab {\uldb backup}{\v backup}.\par}{\fi-2880\li2880\tx2880abbreviations for months:\tab {\uldb Calendar date item}{\v Calendar_date_item}.\par}{\fi-2880\li2880\tx2880absolute file names:\tab {\uldb Remote Tape Server}{\v Remote_Tape_Server}.\par}{\fi-2880\li2880\tx2880Adding archives to an archive:\tab {\uldb concatenate}{\v concatenate}.\par}{\fi-2880\li2880\tx2880Adding files to an Archive:\tab {\uldb appending files}{\v appending_files}.\par}{\fi-2880\li2880\tx2880Age, excluding files by:\tab {\uldb after}{\v after}.\par}{\fi-2880\li2880\tx2880ago in date strings:\tab {\uldb Relative item in date strings}{\v Relative_item_in_date_strings}.\par}{\fi-2880\li2880\tx2880Alaska-Hawaii Time:\tab {\uldb Timezone item}{\v Timezone_item}.\par}{\fi-2880\li2880\tx2880am in date strings:\tab {\uldb Time of day item}{\v Time_of_day_item}.\par}{\fi-2880\li2880\tx2880Appending files to an Archive:\tab {\uldb appending files}{\v appending_files}.\par}{\fi-2880\li2880\tx2880archive:\tab {\uldb Definitions}{\v Definitions}.\par}{\fi-2880\li2880\tx2880Archive creation:\tab {\uldb file}{\v file}.\par}{\fi-2880\li2880\tx2880archive member:\tab {\uldb Definitions}{\v Definitions}.\par}{\fi-2880\li2880\tx2880Archive Name:\tab {\uldb file}{\v file}.\par}{\fi-2880\li2880\tx2880Archives, Appending files to:\tab {\uldb appending files}{\v appending_files}.\par}{\fi-2880\li2880\tx2880Archiving Directories:\tab {\uldb create dir}{\v create_dir}.\par}{\fi-2880\li2880\tx2880Atlantic Standard Time:\tab {\uldb Timezone item}{\v Timezone_item}.\par}{\fi-2880\li2880\tx2880authors of {\f1{}getdate}:\tab {\uldb Authors of getdate}{\v Authors_of_getdate}.\par}{\fi-2880\li2880\tx2880Avoiding recursion in directories:\tab {\uldb recurse}{\v recurse}.\par}{\fi-2880\li2880\tx2880Azores Time:\tab {\uldb Timezone item}{\v Timezone_item}.\par}{\fi-2880\li2880\tx2880backup files, type made:\tab {\uldb backup}{\v backup}.\par}{\fi-2880\li2880\tx2880backup options:\tab {\uldb backup}{\v backup}.\par}{\fi-2880\li2880\tx2880backup suffix:\tab {\uldb backup}{\v backup}.\par}{\fi-2880\li2880\tx2880backups, making:\tab {\uldb backup}{\v backup}.\par}{\fi-2880\li2880\tx2880Baghdad Time:\tab {\uldb Timezone item}{\v Timezone_item}.\par}{\fi-2880\li2880\tx2880beginning of time, for Unix:\tab {\uldb Date input formats}{\v Date_input_formats}.\par}{\fi-2880\li2880\tx2880Bellovin, Steven M.:\tab {\uldb Authors of getdate}{\v Authors_of_getdate}.\par}{\fi-2880\li2880\tx2880Berets, Jim:\tab {\uldb Authors of getdate}{\v Authors_of_getdate}.\par}{\fi-2880\li2880\tx2880Berry, K.:\tab {\uldb Authors of getdate}{\v Authors_of_getdate}.\par}{\fi-2880\li2880\tx2880Block number where error occured:\tab {\uldb verbose}{\v verbose}.\par}{\fi-2880\li2880\tx2880Blocking Factor:\tab {\uldb Blocking Factor}{\v Blocking_Factor}.\par}{\fi-2880\li2880\tx2880blocking factor:\tab {\uldb Blocking Factor}{\v Blocking_Factor}.\par}{\fi-2880\li2880\tx2880Blocks per record:\tab {\uldb Blocking Factor}{\v Blocking_Factor}.\par}{\fi-2880\li2880\tx2880bug reports:\tab {\uldb Reports}{\v Reports}.\par}{\fi-2880\li2880\tx2880Bytes per record:\tab {\uldb Blocking Factor}{\v Blocking_Factor}.\par}{\fi-2880\li2880\tx2880calendar date item:\tab {\uldb Calendar date item}{\v Calendar_date_item}.\par}{\fi-2880\li2880\tx2880case, ignored in dates:\tab {\uldb General date syntax}{\v General_date_syntax}.\par}{\fi-2880\li2880\tx2880Central Alaska Time:\tab {\uldb Timezone item}{\v Timezone_item}.\par}{\fi-2880\li2880\tx2880Central European Time:\tab {\uldb Timezone item}{\v Timezone_item}.\par}{\fi-2880\li2880\tx2880Central Standard Time:\tab {\uldb Timezone item}{\v Timezone_item}.\par}{\fi-2880\li2880\tx2880Changing directory mid-stream:\tab {\uldb directory}{\v directory}.\par}{\fi-2880\li2880\tx2880Character class, excluding characters from:\tab {\uldb Wildcards}{\v Wildcards}.\par}{\fi-2880\li2880\tx2880China Coast Time:\tab {\uldb Timezone item}{\v Timezone_item}.\par}{\fi-2880\li2880\tx2880Choosing an archive file:\tab {\uldb file}{\v file}.\par}{\fi-2880\li2880\tx2880comments, in dates:\tab {\uldb General date syntax}{\v General_date_syntax}.\par}{\fi-2880\li2880\tx2880Compressed archives:\tab {\uldb gzip}{\v gzip}.\par}{\fi-2880\li2880\tx2880Concatenating Archives:\tab {\uldb concatenate}{\v concatenate}.\par}{\fi-2880\li2880\tx2880corrupted archives <1>:\tab {\uldb Full Dumps}{\v Full_Dumps}.\par}{\fi-2880\li2880\tx2880corrupted archives:\tab {\uldb gzip}{\v gzip}.\par}{\fi-2880\li2880\tx2880DAT blocking:\tab {\uldb Blocking Factor}{\v Blocking_Factor}.\par}{\fi-2880\li2880\tx2880date format, ISO 8601:\tab {\uldb Calendar date item}{\v Calendar_date_item}.\par}{\fi-2880\li2880\tx2880date input formats:\tab {\uldb Date input formats}{\v Date_input_formats}.\par}{\fi-2880\li2880\tx2880day in date strings:\tab {\uldb Relative item in date strings}{\v Relative_item_in_date_strings}.\par}{\fi-2880\li2880\tx2880day of week item:\tab {\uldb Day of week item}{\v Day_of_week_item}.\par}{\fi-2880\li2880\tx2880daylight savings time:\tab {\uldb Timezone item}{\v Timezone_item}.\par}{\fi-2880\li2880\tx2880Deleting files from an archive:\tab {\uldb delete}{\v delete}.\par}{\fi-2880\li2880\tx2880Deleting from tape archives:\tab {\uldb delete}{\v delete}.\par}{\fi-2880\li2880\tx2880Descending directories, avoiding:\tab {\uldb recurse}{\v recurse}.\par}{\fi-2880\li2880\tx2880Directing output:\tab {\uldb file}{\v file}.\par}{\fi-2880\li2880\tx2880Directories, Archiving:\tab {\uldb create dir}{\v create_dir}.\par}{\fi-2880\li2880\tx2880Directories, avoiding recursion:\tab {\uldb recurse}{\v recurse}.\par}{\fi-2880\li2880\tx2880Directory, changing mid-stream:\tab {\uldb directory}{\v directory}.\par}{\fi-2880\li2880\tx2880Disk space, running out of:\tab {\uldb Scarce}{\v Scarce}.\par}{\fi-2880\li2880\tx2880displacement of dates:\tab {\uldb Relative item in date strings}{\v Relative_item_in_date_strings}.\par}{\fi-2880\li2880\tx2880Double-checking a write operation:\tab {\uldb verify}{\v verify}.\par}{\fi-2880\li2880\tx2880dumps, full:\tab {\uldb Full Dumps}{\v Full_Dumps}.\par}{\fi-2880\li2880\tx2880dumps, incremental:\tab {\uldb Inc Dumps}{\v Inc_Dumps}.\par}{\fi-2880\li2880\tx2880East Australian Standard Time:\tab {\uldb Timezone item}{\v Timezone_item}.\par}{\fi-2880\li2880\tx2880Eastern European Time:\tab {\uldb Timezone item}{\v Timezone_item}.\par}{\fi-2880\li2880\tx2880Eastern Standard Time:\tab {\uldb Timezone item}{\v Timezone_item}.\par}{\fi-2880\li2880\tx2880End-of-archive entries, ignoring:\tab {\uldb Reading}{\v Reading}.\par}{\fi-2880\li2880\tx2880entry:\tab {\uldb Naming tar Archives}{\v Naming_tar_Archives}.\par}{\fi-2880\li2880\tx2880epoch, for Unix:\tab {\uldb Date input formats}{\v Date_input_formats}.\par}{\fi-2880\li2880\tx2880Error message, block number of:\tab {\uldb verbose}{\v verbose}.\par}{\fi-2880\li2880\tx2880Exabyte blocking:\tab {\uldb Blocking Factor}{\v Blocking_Factor}.\par}{\fi-2880\li2880\tx2880exclude:\tab {\uldb exclude}{\v exclude}.\par}{\fi-2880\li2880\tx2880exclude-from:\tab {\uldb exclude}{\v exclude}.\par}{\fi-2880\li2880\tx2880Excluding characters from a character class:\tab {\uldb Wildcards}{\v Wildcards}.\par}{\fi-2880\li2880\tx2880Excluding file by age:\tab {\uldb after}{\v after}.\par}{\fi-2880\li2880\tx2880Excluding files by file system:\tab {\uldb exclude}{\v exclude}.\par}{\fi-2880\li2880\tx2880Excluding files by name and pattern:\tab {\uldb exclude}{\v exclude}.\par}{\fi-2880\li2880\tx2880existing backup method:\tab {\uldb backup}{\v backup}.\par}{\fi-2880\li2880\tx2880exit status:\tab {\uldb Synopsis}{\v Synopsis}.\par}{\fi-2880\li2880\tx2880extraction:\tab {\uldb Definitions}{\v Definitions}.\par}{\fi-2880\li2880\tx2880Extraction:\tab {\uldb extract}{\v extract}.\par}{\fi-2880\li2880\tx2880Feedback from {\f1{}tar}:\tab {\uldb verbose}{\v verbose}.\par}{\fi-2880\li2880\tx2880file name:\tab {\uldb Definitions}{\v Definitions}.\par}{\fi-2880\li2880\tx2880File Name arguments, alternatives:\tab {\uldb files}{\v files}.\par}{\fi-2880\li2880\tx2880File name arguments, using {\f1{}--list} with:\tab {\uldb list}{\v list}.\par}{\fi-2880\li2880\tx2880File names, excluding files by:\tab {\uldb exclude}{\v exclude}.\par}{\fi-2880\li2880\tx2880File names, terminated by {\f1{}NUL}:\tab {\uldb nul}{\v nul}.\par}{\fi-2880\li2880\tx2880File names, using symbolic links:\tab {\uldb dereference}{\v dereference}.\par}{\fi-2880\li2880\tx2880File system boundaries, not crossing:\tab {\uldb one}{\v one}.\par}{\fi-2880\li2880\tx2880first in date strings:\tab {\uldb General date syntax}{\v General_date_syntax}.\par}{\fi-2880\li2880\tx2880Format Options:\tab {\uldb Format Variations}{\v Format_Variations}.\par}{\fi-2880\li2880\tx2880Format Parameters:\tab {\uldb Format Variations}{\v Format_Variations}.\par}{\fi-2880\li2880\tx2880Format, old style:\tab {\uldb old}{\v old}.\par}{\fi-2880\li2880\tx2880fortnight in date strings:\tab {\uldb Relative item in date strings}{\v Relative_item_in_date_strings}.\par}{\fi-2880\li2880\tx2880French Winter Time:\tab {\uldb Timezone item}{\v Timezone_item}.\par}{\fi-2880\li2880\tx2880full dumps:\tab {\uldb Full Dumps}{\v Full_Dumps}.\par}{\fi-2880\li2880\tx2880general date syntax:\tab {\uldb General date syntax}{\v General_date_syntax}.\par}{\fi-2880\li2880\tx2880getdate:\tab {\uldb Date input formats}{\v Date_input_formats}.\par}{\fi-2880\li2880\tx2880Getting more information during the operation:\tab {\uldb verbose}{\v verbose}.\par}{\fi-2880\li2880\tx2880Greenwich Mean Time:\tab {\uldb Timezone item}{\v Timezone_item}.\par}{\fi-2880\li2880\tx2880Guam Standard Time:\tab {\uldb Timezone item}{\v Timezone_item}.\par}{\fi-2880\li2880\tx2880Hawaii Standard Time:\tab {\uldb Timezone item}{\v Timezone_item}.\par}{\fi-2880\li2880\tx2880hour in date strings:\tab {\uldb Relative item in date strings}{\v Relative_item_in_date_strings}.\par}{\fi-2880\li2880\tx2880Ignoring end-of-archive entries:\tab {\uldb Reading}{\v Reading}.\par}{\fi-2880\li2880\tx2880incremental dumps:\tab {\uldb Inc Dumps}{\v Inc_Dumps}.\par}{\fi-2880\li2880\tx2880Information during operation:\tab {\uldb verbose}{\v verbose}.\par}{\fi-2880\li2880\tx2880Information on progress and status of operations:\tab {\uldb verbose}{\v verbose}.\par}{\fi-2880\li2880\tx2880Interactive operation:\tab {\uldb interactive}{\v interactive}.\par}{\fi-2880\li2880\tx2880International Date Line East:\tab {\uldb Timezone item}{\v Timezone_item}.\par}{\fi-2880\li2880\tx2880International Date Line West:\tab {\uldb Timezone item}{\v Timezone_item}.\par}{\fi-2880\li2880\tx2880ISO 8601 date format:\tab {\uldb Calendar date item}{\v Calendar_date_item}.\par}{\fi-2880\li2880\tx2880items in date strings:\tab {\uldb General date syntax}{\v General_date_syntax}.\par}{\fi-2880\li2880\tx2880Japan Standard Time:\tab {\uldb Timezone item}{\v Timezone_item}.\par}{\fi-2880\li2880\tx2880Labeling an archive:\tab {\uldb label}{\v label}.\par}{\fi-2880\li2880\tx2880Labelling multi-volume archives:\tab {\uldb Multi-Volume Archives}{\v Multi_Volume_Archives}.\par}{\fi-2880\li2880\tx2880Labels on the archive media:\tab {\uldb label}{\v label}.\par}{\fi-2880\li2880\tx2880Large lists of file names on small machines:\tab {\uldb Reading}{\v Reading}.\par}{\fi-2880\li2880\tx2880last in date strings:\tab {\uldb General date syntax}{\v General_date_syntax}.\par}{\fi-2880\li2880\tx2880last {\i day}:\tab {\uldb Day of week item}{\v Day_of_week_item}.\par}{\fi-2880\li2880\tx2880Lists of file names:\tab {\uldb files}{\v files}.\par}{\fi-2880\li2880\tx2880MacKenzie, David:\tab {\uldb Authors of getdate}{\v Authors_of_getdate}.\par}{\fi-2880\li2880\tx2880member:\tab {\uldb Definitions}{\v Definitions}.\par}{\fi-2880\li2880\tx2880member name:\tab {\uldb Definitions}{\v Definitions}.\par}{\fi-2880\li2880\tx2880Members, replacing with other members:\tab {\uldb append}{\v append}.\par}{\fi-2880\li2880\tx2880Meyering, Jim:\tab {\uldb Authors of getdate}{\v Authors_of_getdate}.\par}{\fi-2880\li2880\tx2880Middle European Time:\tab {\uldb Timezone item}{\v Timezone_item}.\par}{\fi-2880\li2880\tx2880Middle European Winter Time:\tab {\uldb Timezone item}{\v Timezone_item}.\par}{\fi-2880\li2880\tx2880Middle of the archive, starting in the:\tab {\uldb Scarce}{\v Scarce}.\par}{\fi-2880\li2880\tx2880midnight in date strings:\tab {\uldb Time of day item}{\v Time_of_day_item}.\par}{\fi-2880\li2880\tx2880minute in date strings:\tab {\uldb Relative item in date strings}{\v Relative_item_in_date_strings}.\par}{\fi-2880\li2880\tx2880minutes, timezone correction by:\tab {\uldb Time of day item}{\v Time_of_day_item}.\par}{\fi-2880\li2880\tx2880Modes of extracted files:\tab {\uldb Writing}{\v Writing}.\par}{\fi-2880\li2880\tx2880Modification time, excluding files by:\tab {\uldb after}{\v after}.\par}{\fi-2880\li2880\tx2880Modification times of extracted files:\tab {\uldb Writing}{\v Writing}.\par}{\fi-2880\li2880\tx2880month in date strings:\tab {\uldb Relative item in date strings}{\v Relative_item_in_date_strings}.\par}{\fi-2880\li2880\tx2880month names in date strings:\tab {\uldb Calendar date item}{\v Calendar_date_item}.\par}{\fi-2880\li2880\tx2880months, written-out:\tab {\uldb General date syntax}{\v General_date_syntax}.\par}{\fi-2880\li2880\tx2880Mountain Standard Time:\tab {\uldb Timezone item}{\v Timezone_item}.\par}{\fi-2880\li2880\tx2880Multi-volume archives:\tab {\uldb Multi-Volume Archives}{\v Multi_Volume_Archives}.\par}{\fi-2880\li2880\tx2880Naming an archive:\tab {\uldb file}{\v file}.\par}{\fi-2880\li2880\tx2880New Zealand Standard Time:\tab {\uldb Timezone item}{\v Timezone_item}.\par}{\fi-2880\li2880\tx2880next in date strings:\tab {\uldb General date syntax}{\v General_date_syntax}.\par}{\fi-2880\li2880\tx2880next {\i day}:\tab {\uldb Day of week item}{\v Day_of_week_item}.\par}{\fi-2880\li2880\tx2880Nome Standard Time:\tab {\uldb Timezone item}{\v Timezone_item}.\par}{\fi-2880\li2880\tx2880noon in date strings:\tab {\uldb Time of day item}{\v Time_of_day_item}.\par}{\fi-2880\li2880\tx2880now in date strings:\tab {\uldb Relative item in date strings}{\v Relative_item_in_date_strings}.\par}{\fi-2880\li2880\tx2880ntape device:\tab {\uldb Many}{\v Many}.\par}{\fi-2880\li2880\tx2880Number of blocks per record:\tab {\uldb Blocking Factor}{\v Blocking_Factor}.\par}{\fi-2880\li2880\tx2880Number of bytes per record:\tab {\uldb Blocking Factor}{\v Blocking_Factor}.\par}{\fi-2880\li2880\tx2880numbered backup method:\tab {\uldb backup}{\v backup}.\par}{\fi-2880\li2880\tx2880numbers, written-out:\tab {\uldb General date syntax}{\v General_date_syntax}.\par}{\fi-2880\li2880\tx2880Old style archives:\tab {\uldb old}{\v old}.\par}{\fi-2880\li2880\tx2880Old style format:\tab {\uldb old}{\v old}.\par}{\fi-2880\li2880\tx2880option syntax, traditional:\tab {\uldb Old Options}{\v Old_Options}.\par}{\fi-2880\li2880\tx2880Options when reading archives:\tab {\uldb Reading}{\v Reading}.\par}{\fi-2880\li2880\tx2880Options, archive format specifying:\tab {\uldb Format Variations}{\v Format_Variations}.\par}{\fi-2880\li2880\tx2880Options, format specifying:\tab {\uldb Format Variations}{\v Format_Variations}.\par}{\fi-2880\li2880\tx2880ordinal numbers:\tab {\uldb General date syntax}{\v General_date_syntax}.\par}{\fi-2880\li2880\tx2880Overwriting old files, prevention:\tab {\uldb Writing}{\v Writing}.\par}{\fi-2880\li2880\tx2880Pacific Standard Time:\tab {\uldb Timezone item}{\v Timezone_item}.\par}{\fi-2880\li2880\tx2880Permissions of extracted files:\tab {\uldb Writing}{\v Writing}.\par}{\fi-2880\li2880\tx2880Pinard, F.:\tab {\uldb Authors of getdate}{\v Authors_of_getdate}.\par}{\fi-2880\li2880\tx2880pm in date strings:\tab {\uldb Time of day item}{\v Time_of_day_item}.\par}{\fi-2880\li2880\tx2880Progress information:\tab {\uldb verbose}{\v verbose}.\par}{\fi-2880\li2880\tx2880Protecting old files:\tab {\uldb Writing}{\v Writing}.\par}{\fi-2880\li2880\tx2880pure numbers in date strings:\tab {\uldb Pure numbers in date strings}{\v Pure_numbers_in_date_strings}.\par}{\fi-2880\li2880\tx2880Reading file names from a file:\tab {\uldb files}{\v files}.\par}{\fi-2880\li2880\tx2880Reading incomplete records:\tab {\uldb Reading}{\v Reading}.\par}{\fi-2880\li2880\tx2880Record Size:\tab {\uldb Blocking Factor}{\v Blocking_Factor}.\par}{\fi-2880\li2880\tx2880Records, incomplete:\tab {\uldb Reading}{\v Reading}.\par}{\fi-2880\li2880\tx2880Recursion in directories, avoiding:\tab {\uldb recurse}{\v recurse}.\par}{\fi-2880\li2880\tx2880relative items in date strings:\tab {\uldb Relative item in date strings}{\v Relative_item_in_date_strings}.\par}{\fi-2880\li2880\tx2880remote tape drive:\tab {\uldb Remote Tape Server}{\v Remote_Tape_Server}.\par}{\fi-2880\li2880\tx2880Removing files from an archive:\tab {\uldb delete}{\v delete}.\par}{\fi-2880\li2880\tx2880Replacing members with other members:\tab {\uldb append}{\v append}.\par}{\fi-2880\li2880\tx2880reporting bugs:\tab {\uldb Reports}{\v Reports}.\par}{\fi-2880\li2880\tx2880Resurrecting files from an archive:\tab {\uldb extract}{\v extract}.\par}{\fi-2880\li2880\tx2880Retrieving files from an archive:\tab {\uldb extract}{\v extract}.\par}{\fi-2880\li2880\tx2880return status:\tab {\uldb Synopsis}{\v Synopsis}.\par}{\fi-2880\li2880\tx2880rmt:\tab {\uldb Remote Tape Server}{\v Remote_Tape_Server}.\par}{\fi-2880\li2880\tx2880Running out of space:\tab {\uldb Reading}{\v Reading}.\par}{\fi-2880\li2880\tx2880Running out of space during extraction:\tab {\uldb Scarce}{\v Scarce}.\par}{\fi-2880\li2880\tx2880Salz, Rich:\tab {\uldb Authors of getdate}{\v Authors_of_getdate}.\par}{\fi-2880\li2880\tx2880simple backup method:\tab {\uldb backup}{\v backup}.\par}{\fi-2880\li2880\tx2880SIMPLE_BACKUP_SUFFIX:\tab {\uldb backup}{\v backup}.\par}{\fi-2880\li2880\tx2880Small memory:\tab {\uldb Reading}{\v Reading}.\par}{\fi-2880\li2880\tx2880Space on the disk, recovering from lack of:\tab {\uldb Scarce}{\v Scarce}.\par}{\fi-2880\li2880\tx2880Sparse Files:\tab {\uldb sparse}{\v sparse}.\par}{\fi-2880\li2880\tx2880Specifying archive members:\tab {\uldb Selecting Archive Members}{\v Selecting_Archive_Members}.\par}{\fi-2880\li2880\tx2880Specifying files to act on:\tab {\uldb Selecting Archive Members}{\v Selecting_Archive_Members}.\par}{\fi-2880\li2880\tx2880Standard input and output:\tab {\uldb file}{\v file}.\par}{\fi-2880\li2880\tx2880Standard output, writing extracted files to:\tab {\uldb Writing}{\v Writing}.\par}{\fi-2880\li2880\tx2880Status information:\tab {\uldb verbose}{\v verbose}.\par}{\fi-2880\li2880\tx2880Storing archives in compressed format:\tab {\uldb gzip}{\v gzip}.\par}{\fi-2880\li2880\tx2880Swedish Winter Time:\tab {\uldb Timezone item}{\v Timezone_item}.\par}{\fi-2880\li2880\tx2880Symbolic link as file name:\tab {\uldb dereference}{\v dereference}.\par}{\fi-2880\li2880\tx2880tape blocking:\tab {\uldb Blocking Factor}{\v Blocking_Factor}.\par}{\fi-2880\li2880\tx2880tape marks:\tab {\uldb Many}{\v Many}.\par}{\fi-2880\li2880\tx2880tape positioning:\tab {\uldb Many}{\v Many}.\par}{\fi-2880\li2880\tx2880Tapes, using {\f1{}--delete} and:\tab {\uldb delete}{\v delete}.\par}{\fi-2880\li2880\tx2880tar:\tab {\uldb What tar Does}{\v What_tar_Does}.\par}{\fi-2880\li2880\tx2880tar archive:\tab {\uldb Definitions}{\v Definitions}.\par}{\fi-2880\li2880\tx2880tar entry:\tab {\uldb Naming tar Archives}{\v Naming_tar_Archives}.\par}{\fi-2880\li2880\tx2880tar file:\tab {\uldb Naming tar Archives}{\v Naming_tar_Archives}.\par}{\fi-2880\li2880\tx2880tar to standard input and output:\tab {\uldb file}{\v file}.\par}{\fi-2880\li2880\tx2880this in date strings:\tab {\uldb Relative item in date strings}{\v Relative_item_in_date_strings}.\par}{\fi-2880\li2880\tx2880time of day item:\tab {\uldb Time of day item}{\v Time_of_day_item}.\par}{\fi-2880\li2880\tx2880timezone correction:\tab {\uldb Time of day item}{\v Time_of_day_item}.\par}{\fi-2880\li2880\tx2880timezone item:\tab {\uldb Timezone item}{\v Timezone_item}.\par}{\fi-2880\li2880\tx2880today in date strings:\tab {\uldb Relative item in date strings}{\v Relative_item_in_date_strings}.\par}{\fi-2880\li2880\tx2880tomorrow in date strings:\tab {\uldb Relative item in date strings}{\v Relative_item_in_date_strings}.\par}{\fi-2880\li2880\tx2880Ultrix 3.1 and write failure:\tab {\uldb Remote Tape Server}{\v Remote_Tape_Server}.\par}{\fi-2880\li2880\tx2880Universal Coordinated Time:\tab {\uldb Timezone item}{\v Timezone_item}.\par}{\fi-2880\li2880\tx2880unpacking:\tab {\uldb Definitions}{\v Definitions}.\par}{\fi-2880\li2880\tx2880Updating an archive:\tab {\uldb update}{\v update}.\par}{\fi-2880\li2880\tx2880USSR Zone:\tab {\uldb Timezone item}{\v Timezone_item}.\par}{\fi-2880\li2880\tx2880uuencode:\tab {\uldb Applications}{\v Applications}.\par}{\fi-2880\li2880\tx2880Verbose operation:\tab {\uldb verbose}{\v verbose}.\par}{\fi-2880\li2880\tx2880Verifying a write operation:\tab {\uldb verify}{\v verify}.\par}{\fi-2880\li2880\tx2880Verifying the currency of an archive:\tab {\uldb compare}{\v compare}.\par}{\fi-2880\li2880\tx2880Version of the {\f1{}tar} program:\tab {\uldb verbose}{\v verbose}.\par}{\fi-2880\li2880\tx2880version-control Emacs variable:\tab {\uldb backup}{\v backup}.\par}{\fi-2880\li2880\tx2880VERSION_CONTROL:\tab {\uldb backup}{\v backup}.\par}{\fi-2880\li2880\tx2880week in date strings:\tab {\uldb Relative item in date strings}{\v Relative_item_in_date_strings}.\par}{\fi-2880\li2880\tx2880West African Time:\tab {\uldb Timezone item}{\v Timezone_item}.\par}{\fi-2880\li2880\tx2880West Australian Standard Time:\tab {\uldb Timezone item}{\v Timezone_item}.\par}{\fi-2880\li2880\tx2880Western European Time:\tab {\uldb Timezone item}{\v Timezone_item}.\par}{\fi-2880\li2880\tx2880Where is the archive?:\tab {\uldb file}{\v file}.\par}{\fi-2880\li2880\tx2880Working directory, specifying:\tab {\uldb directory}{\v directory}.\par}{\fi-2880\li2880\tx2880Writing extracted files to standard output:\tab {\uldb Writing}{\v Writing}.\par}{\fi-2880\li2880\tx2880Writing new archives:\tab {\uldb file}{\v file}.\par}{\fi-2880\li2880\tx2880year in date strings:\tab {\uldb Relative item in date strings}{\v Relative_item_in_date_strings}.\par}{\fi-2880\li2880\tx2880yesterday in date strings:\tab {\uldb Relative item in date strings}{\v Relative_item_in_date_strings}.\par}{\fi-2880\li2880\tx2880Yukon Standard Time:\tab {\uldb Timezone item}{\v Timezone_item}.\par}{\fi-2880\li2880\tx2880{\f1{}--list} with file name arguments:\tab {\uldb list}{\v list}.\par}{\fi-2880\li2880\tx2880{\f1{}cat} vs {\f1{}concatenate}:\tab {\uldb concatenate}{\v concatenate}.\par}{\fi-2880\li2880\tx2880{\f1{}concatenate} vs {\f1{}cat}:\tab {\uldb concatenate}{\v concatenate}.\par}{\fi-2880\li2880\tx2880{\f1{}NUL} terminated file names:\tab {\uldb nul}{\v nul}.\par}\page K{\footnote Makertf}#{\footnote hcMakertf}${\footnote \pard{}About Makertf}\pard{\fs24\b About Makertf}\par\par\pard{}Makertf is a program that converts "Texinfo" files into "Rich Text Format" (RTF) files. It can be used to make WinHelp Files from GNU manuals and other documentation written in Texinfo. Visit http://www.snafu.de/~cschenk/makertf for more information.}